mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Have std/json check numbers are expected
This commit is contained in:
1 parent
7acb35f05d
commit
b194c7fbb9
2 files changed
+7
No files matched your search
@@ -248,6 +248,9 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader) {
|
||||
|
||||
} else if (c >= 0x30) or (c == 0x2D) { // 0x30 is '0', 0x2D is '-'.
|
||||
// -------- BEGIN parse numbers.
|
||||
if 0 == (expect & 0x01) { // 0x02 is EXPECT_NON_STRING_VALUE.
|
||||
return "#bad input"
|
||||
}
|
||||
while true,
|
||||
pre args.dst.available() > 0,
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user