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 @@
- Add: versions to database
- Add: row_format option for lkt, for small screens (can be oneline, pretty or auto)
- 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: Malloc the correct struct and store it into the right pointer type...
- Change: now have macros to wrap malloc calls
......
......@@ -164,7 +164,7 @@ __decode_json(char *string, size_t len)
/* UTF-8 decode, 4 hex digits */
case 'u':
if (len < 4) {
LOG_ERROR("JSON", "Invalid unicode string, abort decoding");
LOG_ERROR("JSON", "Invalid unicode string, abort decoding. String was: %s", string);
return;
}
size = 6; /* \u + 4 hex digits */
......@@ -174,7 +174,7 @@ __decode_json(char *string, size_t len)
/* Oups */
default:
LOG_ERROR("JSON", "Invalid json string, abort the decoding");
LOG_ERROR("JSON", "Invalid json string, abort the decoding. String was: %s", string);
return;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter