Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 7973ef37 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

JSON: Print invalid utf8 string to debug things

parent f0fd5e7a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!162Add a trie structure to get all the commands + various fixes
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
- Add: versions to database - Add: versions to database
- Add: row_format option for lkt, for small screens (can be oneline, pretty or auto) - Add: row_format option for lkt, for small screens (can be oneline, pretty or auto)
- Fix: endiannes functions (again) - Fix: endiannes functions (again)
- Fix: fix the \_\_insert command
- Fix: linking on some platforms where the sqlite3_hard_heap_limit64 function is not present - Fix: linking on some platforms where the sqlite3_hard_heap_limit64 function is not present
- Fix: Malloc the correct struct and store it into the right pointer type... - Fix: Malloc the correct struct and store it into the right pointer type...
- Change: now have macros to wrap malloc calls - Change: now have macros to wrap malloc calls
......
...@@ -164,7 +164,7 @@ __decode_json(char *string, size_t len) ...@@ -164,7 +164,7 @@ __decode_json(char *string, size_t len)
/* UTF-8 decode, 4 hex digits */ /* UTF-8 decode, 4 hex digits */
case 'u': case 'u':
if (len < 4) { if (len < 4) {
LOG_ERROR("JSON", "Invalid unicode string, abort decoding"); LOG_ERROR("JSON", "Invalid unicode string, abort decoding. String was: %s", string);
return; return;
} }
size = 6; /* \u + 4 hex digits */ size = 6; /* \u + 4 hex digits */
...@@ -174,7 +174,7 @@ __decode_json(char *string, size_t len) ...@@ -174,7 +174,7 @@ __decode_json(char *string, size_t len)
/* Oups */ /* Oups */
default: default:
LOG_ERROR("JSON", "Invalid json string, abort the decoding"); LOG_ERROR("JSON", "Invalid json string, abort the decoding. String was: %s", string);
return; return;
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter