summaryrefslogtreecommitdiff
path: root/mi/cfg.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 /mi/cfg.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 'mi/cfg.c')
-rw-r--r--mi/cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mi/cfg.c b/mi/cfg.c
index 18eb838..4557c5e 100644
--- a/mi/cfg.c
+++ b/mi/cfg.c
@@ -218,7 +218,7 @@ Cfg *mkcfg(Node *fn, Node **nl, size_t nn)
}
}
post = mkbb(cfg);
- snprintf(buf, sizeof buf, ".R%d", nextret++);
+ bprintf(buf, sizeof buf, ".R%d", nextret++);
label(cfg, mklbl(fn->loc, buf), post);
cfg->start = pre;