Browse Source

:bug: Debug parse boolean json

Arthur Brandao 6 years ago
parent
commit
847abb7385
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Serveur/json_parser.c

+ 4 - 4
Serveur/json_parser.c

@@ -103,15 +103,15 @@ int parse_val(JsonParser* this, int index, char* json){
             break;
         //Boolean
         case 't':
-            compteur = 4;
+            compteur = 3;
             this->val[index] = json;
-            this->val_length[index] = compteur;
+            this->val_length[index] = compteur + 1;
             this->type[index] = JSON_BOOLEAN;
             break;
         case 'f':
-            compteur = 5;
+            compteur = 4;
             this->val[index] = json;
-            this->val_length[index] = compteur;
+            this->val_length[index] = compteur + 1;
             this->type[index] = JSON_BOOLEAN;
             break;
         //Nombre