summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-07-10 17:33:17 -0700
committerScott Shawcroft <scott@tannewt.org>2020-07-10 17:33:17 -0700
commit372bcf8a956c8b20c423333114d7aa061dd54751 (patch)
treea27b619d18dbc54ff97128f9ee01a55a8ab991a1 /extmod
parent734661e79cc2b108079377642ef24fab1217c484 (diff)
Fix stream version and add basic readinto test
Diffstat (limited to 'extmod')
-rw-r--r--extmod/modujson.c2
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");