[cfe-commits] r99479 - /cfe/trunk/lib/Analysis/PrintfFormatString.cpp
Ted Kremenek
kremenek at apple.com
Wed Mar 24 20:59:09 PDT 2010
Author: kremenek
Date: Wed Mar 24 22:59:09 2010
New Revision: 99479
URL: http://llvm.org/viewvc/llvm-project?rev=99479&view=rev
Log:
Fix '+=' accumulation error when parsing numeric amounts in a format string.
Modified:
cfe/trunk/lib/Analysis/PrintfFormatString.cpp
Modified: cfe/trunk/lib/Analysis/PrintfFormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/PrintfFormatString.cpp?rev=99479&r1=99478&r2=99479&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/PrintfFormatString.cpp (original)
+++ cfe/trunk/lib/Analysis/PrintfFormatString.cpp Wed Mar 24 22:59:09 2010
@@ -75,7 +75,7 @@
char c = *I;
if (c >= '0' && c <= '9') {
hasDigits = true;
- accumulator += (accumulator * 10) + (c - '0');
+ accumulator = (accumulator * 10) + (c - '0');
continue;
}
More information about the cfe-commits
mailing list