mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 19:30:29 +00:00
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:
parent
c78ae967f8
commit
2daad6ede8
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue