vcscanf: buffer the ')' of "nan(whatever)"

For some reason I thought the do while (c = BUFFER ...) loop
already did it for me. Apparently not!
This commit is contained in:
Matheus Afonso Martins Moreira 2023-11-02 20:36:58 -03:00
parent c78ae967f8
commit 2daad6ede8

View file

@ -364,6 +364,9 @@ int __vcscanf(int callback(void *), //
goto Done;
}
} while ((c = BUFFER) != -1 && c != ')');
if (c == ')') {
c = BUFFER;
}
fp = strtod((char *) buf, NULL);
goto GotFloatingPointNumber;
} else {