Fix '+=' accumulation error when parsing numeric amounts in a format string.

llvm-svn: 99479
This commit is contained in:
Ted Kremenek 2010-03-25 03:59:09 +00:00
parent ac418d44ed
commit 186508c7d6
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ static OptionalAmount ParseAmount(const char *&Beg, const char *E) {
char c = *I;
if (c >= '0' && c <= '9') {
hasDigits = true;
accumulator += (accumulator * 10) + (c - '0');
accumulator = (accumulator * 10) + (c - '0');
continue;
}