Browse Source

fix: strbuf的is_err未初始化,导致可能一开始就报错

Wendal Chen 3 years ago
parent
commit
6e652934be
1 changed files with 1 additions and 0 deletions
  1. 1 0
      components/lua-cjson/strbuf.c

+ 1 - 0
components/lua-cjson/strbuf.c

@@ -56,6 +56,7 @@ int strbuf_init(strbuf_t *s, int len)
     s->length = 0;
     s->increment = STRBUF_DEFAULT_INCREMENT;
     s->dynamic = 0;
+    s->is_err = 0;
     // s->reallocs = 0;
     // s->debug = 0;