X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/51631861ddb16afcfcf748cee26c14481549065e..59e0d9fe772464b93d835d2a2964457702469a43:/gdtoa/FreeBSD/gdtoa-strtod.c diff --git a/gdtoa/FreeBSD/gdtoa-strtod.c b/gdtoa/FreeBSD/gdtoa-strtod.c index f1a0c04..4913d50 100644 --- a/gdtoa/FreeBSD/gdtoa-strtod.c +++ b/gdtoa/FreeBSD/gdtoa-strtod.c @@ -114,15 +114,17 @@ strtod switch(s[1]) { case 'x': case 'X': - switch(i = gethex(&s, &fpi, &exp, &bb, sign)) { + switch((i = gethex(&s, &fpi, &exp, &bb, sign)) & STRTOG_Retmask) { case STRTOG_NoNumber: s = s00; sign = 0; case STRTOG_Zero: break; default: - copybits(bits, fpi.nbits, bb); - Bfree(bb); + if (bb) { + copybits(bits, fpi.nbits, bb); + Bfree(bb); + } ULtod(((U*)&rv)->L, bits, exp, i); } goto ret;