diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-07-10 17:33:17 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-07-10 17:33:17 -0700 |
| commit | 372bcf8a956c8b20c423333114d7aa061dd54751 (patch) | |
| tree | a27b619d18dbc54ff97128f9ee01a55a8ab991a1 /extmod/modujson.c | |
| parent | 734661e79cc2b108079377642ef24fab1217c484 (diff) | |
Fix stream version and add basic readinto test
Diffstat (limited to 'extmod/modujson.c')
| -rw-r--r-- | extmod/modujson.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extmod/modujson.c b/extmod/modujson.c index 1e831783a..242726cca 100644 --- a/extmod/modujson.c +++ b/extmod/modujson.c @@ -127,6 +127,8 @@ STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) { stream_p = mp_get_stream_raise(stream_obj, MP_STREAM_OP_READ); s.stream_obj = stream_obj; s.read = stream_p->read; + s.errcode = 0; + s.cur = 0; } JSON_DEBUG("got JSON stream\n"); |
