mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac027144e8
commit
752b2f0d88
@ -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…
Reference in New Issue
Block a user