aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScanfFormatString.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/ScanfFormatString.cpp')
-rw-r--r--lib/Analysis/ScanfFormatString.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScanfFormatString.cpp b/lib/Analysis/ScanfFormatString.cpp
index 1fa4faea18..a5fe77ddd8 100644
--- a/lib/Analysis/ScanfFormatString.cpp
+++ b/lib/Analysis/ScanfFormatString.cpp
@@ -41,7 +41,7 @@ static bool ParseScanList(FormatStringHandler &H,
// Special case: ']' is the first character.
if (*I == ']') {
if (++I == E) {
- H.HandleIncompleteScanList(start, I);
+ H.HandleIncompleteScanList(start, I - 1);
return true;
}
}
@@ -49,7 +49,7 @@ static bool ParseScanList(FormatStringHandler &H,
// Look for a ']' character which denotes the end of the scan list.
while (*I != ']') {
if (++I == E) {
- H.HandleIncompleteScanList(start, I);
+ H.HandleIncompleteScanList(start, I - 1);
return true;
}
}