aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-14 21:55:39 +0000
committerDavid Robillard <d@drobilla.net>2012-01-14 21:55:39 +0000
commite092ff09351eca0f4c2405d594e871f595f080fc (patch)
tree8e81e2f88f44f239778f818059ce2c9198084a60 /src/writer.c
parent62b8156a4be17341a77fc49f7e1fc7c582f4ac5b (diff)
downloadserd-e092ff09351eca0f4c2405d594e871f595f080fc.tar.gz
serd-e092ff09351eca0f4c2405d594e871f595f080fc.tar.bz2
serd-e092ff09351eca0f4c2405d594e871f595f080fc.zip
Lint.
git-svn-id: http://svn.drobilla.net/serd/trunk@283 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/writer.c b/src/writer.c
index 735dcaaf..1d099c63 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -134,7 +134,7 @@ write_text(SerdWriter* writer, TextContext ctx,
}
if (in == terminator) {
- snprintf(escape, 7, "\\u%04X", terminator);
+ snprintf(escape, sizeof(escape), "\\u%04X", terminator);
sink(escape, 6, writer);
continue;
}
@@ -149,7 +149,7 @@ write_text(SerdWriter* writer, TextContext ctx,
|| (is_space(c) && ctx == WRITE_LONG_STRING)) {
sink(&in, 1, writer); // Print ASCII character
} else {
- snprintf(escape, 7, "\\u%04X", c);
+ snprintf(escape, sizeof(escape), "\\u%04X", c);
sink(escape, 6, writer); // Escape ASCII control character
}
continue;
@@ -189,10 +189,10 @@ write_text(SerdWriter* writer, TextContext ctx,
}
if (c < 0xFFFF) {
- snprintf(escape, 7, "\\u%04X", c);
+ snprintf(escape, sizeof(escape), "\\u%04X", c);
sink(escape, 6, writer);
} else {
- snprintf(escape, 11, "\\U%08X", c);
+ snprintf(escape, sizeof(escape), "\\U%08X", c);
sink(escape, 10, writer);
}
}