add player EOF detection
[uwplayer.git] / application / json.c
index ea167e5..9bdea02 100644 (file)
@@ -615,7 +615,7 @@ int json_reader_isnull(JSONParser *p) {
 JSONLiteralType json_reader_literal(JSONParser *p) {
     const char *l = p->reader_token.content;
     size_t token_len = p->reader_token.length;
-    if(token_len == 4 && !memcmp(l, "true", 5)) {
+    if(token_len == 4 && !memcmp(l, "true", 4)) {
         return JSON_TRUE;
     } else if(token_len == 5 && !memcmp(l, "false", 5)) {
         return JSON_FALSE;