summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-02-25 15:58:08 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-02-25 15:58:08 -0500
commit0c9fe50d399890bb56ed61a1d4030c1ea9a95a69 (patch)
tree5bc0c057f26d790303ad5eccc677516a5771561e /src
parent5d8e871068b06290e038e81068623ebb5d43a95a (diff)
Fix C jsify[String|Char]
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c6
1 files changed, 3 insertions, 3 deletions
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;
}
}