X-Git-Url: https://gitweb.ps.run/iftint/blobdiff_plain/43e389670ff0950611c61f19a4399b0eb441f04f..12f5d48d213e393a77b58a3471955d5e3ab6d922:/main2.c diff --git a/main2.c b/main2.c index 12f99d4..51c5ad4 100644 --- a/main2.c +++ b/main2.c @@ -297,6 +297,7 @@ PeekChar() { int GetInt() { static char intStr[16]; + intStr[0] = '\0'; int intStrLen = 0; int result = 0; int c; @@ -363,20 +364,20 @@ GetNode(JSONNode * parent) { } case 'o': { result->kind = JSONNodeKind_Obj; - while ((c = PeekChar()), (c != '\r') && (c != '\n')) { + while ((c = peekch()), (c != '\r') && (c != '\n')) { JSONNodePush(result, JSONNodeNewStr(GetStr())); JSONNodePush(result, GetNode(result)); } - GetChar(); + getch(); break; } case 'a': { result->kind = JSONNodeKind_Arr; - while ((c = PeekChar()), (c != '\r') && (c != '\n')) { + while ((c = peekch()), (c != '\r') && (c != '\n')) { JSONNodePush(result, GetNode(result)); } - GetChar(); + getch(); break; } case 8: