summaryrefslogtreecommitdiff
path: root/6/isel.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 /6/isel.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 '6/isel.c')
-rw-r--r--6/isel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/6/isel.c b/6/isel.c
index 87fe1dd..570343c 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -938,7 +938,7 @@ void selfunc(Isel *is, Func *fn, Htab *globls, Htab *strtab)
for (i = 0; i < bb->nnl; i++) {
/* put in a comment that says where this line comes from */
n = bb->nl[i];
- snprintf(buf, sizeof buf, "bb = %ld, bbidx = %ld, %s:%d",
+ bprintf(buf, sizeof buf, "bb = %ld, bbidx = %ld, %s:%d",
j, i, file->file.files[n->loc.file], n->loc.line);
g(is, Icomment, locstrlbl(buf), NULL);
isel(is, fn->cfg->bb[j]->nl[i]);