From 0c9fe50d399890bb56ed61a1d4030c1ea9a95a69 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Fri, 25 Feb 2011 15:58:08 -0500 Subject: Fix C jsify[String|Char] --- src/c/urweb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/c/urweb.c b/src/c/urweb.c index 693cc87f..6f9297bd 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -1368,7 +1368,7 @@ uw_Basis_string uw_Basis_jsifyString(uw_context ctx, uw_Basis_string s) { if (isprint((int)c) || c >= 128) *s2++ = c; else { - sprintf(s2, "\\%3o", c); + sprintf(s2, "\\%03o", c); s2 += 4; } } @@ -1405,7 +1405,7 @@ uw_Basis_string uw_Basis_jsifyChar(uw_context ctx, uw_Basis_char c1) { if (isprint((int)c) || c >= 128) *s2++ = c; else { - sprintf(s2, "\\%3o", (unsigned char)c); + sprintf(s2, "\\%03o", (unsigned char)c); s2 += 4; } } @@ -1439,7 +1439,7 @@ uw_Basis_string uw_Basis_jsifyString_ws(uw_context ctx, uw_Basis_string s) { if (isprint((int)c) || c >= 128) *s2++ = c; else { - sprintf(s2, "\\%3o", c); + sprintf(s2, "\\%03o", c); s2 += 4; } } -- cgit v1.2.3