mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-10 20:00:27 +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;
|
goto Done;
|
||||||
}
|
}
|
||||||
} while ((c = BUFFER) != -1 && c != ')');
|
} while ((c = BUFFER) != -1 && c != ')');
|
||||||
|
if (c == ')') {
|
||||||
|
c = BUFFER;
|
||||||
|
}
|
||||||
fp = strtod((char *) buf, NULL);
|
fp = strtod((char *) buf, NULL);
|
||||||
goto GotFloatingPointNumber;
|
goto GotFloatingPointNumber;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue