Explorar o código

fix scanning of "-0x" pseudo-hex float (must give negative zero)

Rich Felker %!s(int64=12) %!d(string=hai) anos
pai
achega
f457b1cb0d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/internal/floatscan.c

+ 1 - 1
src/internal/floatscan.c

@@ -352,7 +352,7 @@ static long double hexfloat(FILE *f, int bits, int emin, int sign, int pok)
 		} else {
 			shlim(f, 0);
 		}
-		return 0;
+		return sign * 0.0;
 	}
 	if (!gotrad) rp = dc;
 	while (dc<8) x *= 16, dc++;