mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-25 06:51:30 +00:00
APFloat::toString(): Fix overrun at scanning.
FYI, clang/test/SemaTemplate/template-id-printing.cpp had been failing due to it on cygwin-clang. llvm-svn: 150911
This commit is contained in:
parent
8b2e08187a
commit
4518369791
@ -3340,7 +3340,7 @@ namespace {
|
||||
// Rounding down is just a truncation, except we also want to drop
|
||||
// trailing zeros from the new result.
|
||||
if (buffer[FirstSignificant - 1] < '5') {
|
||||
while (buffer[FirstSignificant] == '0')
|
||||
while (FirstSignificant < N && buffer[FirstSignificant] == '0')
|
||||
FirstSignificant++;
|
||||
|
||||
exp += FirstSignificant;
|
||||
|
Loading…
x
Reference in New Issue
Block a user