forked from OSchip/llvm-project
Fix '+=' accumulation error when parsing numeric amounts in a format string.
llvm-svn: 99479
This commit is contained in:
parent
ac418d44ed
commit
186508c7d6
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue