llvm.org GIT mirror llvm / a89e45f
Handle zero correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44613 91177308-0d34-0410-b5e6-96231b3b80d8 Neil Booth 13 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
230230 is taken to have the decimal point after a single leading
231231 non-zero digit.
232232
233 If the value is zero, V->firstSigDigit points to a zero, and the
234 return exponent is zero.
233 If the value is zero, V->firstSigDigit points to a non-digit, and
234 the return exponent is zero.
235235 */
236236 struct decimalInfo {
237237 const char *firstSigDigit;
262262 }
263263
264264 /* If number is all zerooes accept any exponent. */
265 if (p != D->firstSigDigit) {
265 if (decDigitValue(*p) >= 10U) {
266266 if (*p == 'e' || *p == 'E')
267267 D->exponent = readExponent(p + 1);
268268