summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-07-24 21:19:50 -0700
committerOri Bernstein <ori@eigenstate.org>2015-07-24 21:19:50 -0700
commit2c0fbf27314d04cb3bb5ab1ea3f9b7bae556f89a (patch)
treeb36990ff6538492050e46ac5fa5f83b5b44b9c3e /parse/specialize.c
parent4e656a4f039b9230c820f12d3b1e4a5c8e55cf47 (diff)
downloadmc-2c0fbf27314d04cb3bb5ab1ea3f9b7bae556f89a.tar.gz
Replace snprintf with a variant that asserts when out of buffer.
Let's not happy silent truncate.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index 77230c0..f10ef74 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -370,8 +370,8 @@ Node *genericname(Node *n, Type *t)
return n->decl.name;
p = buf;
end = buf + sizeof buf;
- p += snprintf(p, end - p, "%s", n->decl.name->name.name);
- p += snprintf(p, end - p, "$");
+ p += bprintf(p, end - p, "%s", n->decl.name->name.name);
+ p += bprintf(p, end - p, "$");
p += tyidfmt(p, end - p, t);
name = mkname(n->loc, buf);
if (n->decl.name->name.ns)