summaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorJoey Adams2010-08-06 06:23:12 +0000
committerJoey Adams2010-08-06 06:23:12 +0000
commite87340e2b0c533d1c1d08ddee6471757bc27b74f (patch)
treee22b22154bb1b68a6ccc0f9edf176977f67de9cd /json.c
parentded4716d23370cccf3f1384a11b2d0ba7dbbbf40 (diff)
Finished refining and documenting code in util.c / util.h
Diffstat (limited to 'json.c')
-rw-r--r--json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/json.c b/json.c
index 3cbf46e..948971a 100644
--- a/json.c
+++ b/json.c
@@ -911,12 +911,12 @@ encode_string(StringInfo out, const char *string, size_t length, char quote,
if (c < 0x1F || (c >= 0x80 && escape_unicode))
{
/* Encode using \u.... */
- unsigned int uc,
- lc;
+ pg_wchar uc;
+ unsigned int lc;
char txt[13];
s--;
- utf8_decode_char_nocheck(&s, &uc);
+ uc = utf8_decode_char(&s);
txt[0] = '\\';
txt[1] = 'u';