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
commit45798a7e43ae38eeb238ec04f397a4731c277048 (patch)
tree5bc0c057f26d790303ad5eccc677516a5771561e /src
parent7ff3e5339ed2ba17c022e190bcb8cbb579188c89 (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;
}
}