From 49caf79ce647cda9e5125d808fabd3e433194cf1 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Wed, 27 Nov 2013 06:31:12 -0800 Subject: [PATCH] [bugfix] new_uniq_sym must take one more byte chunk for new string --- src/macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macro.c b/src/macro.c index eeb050f1..4a9b77be 100644 --- a/src/macro.c +++ b/src/macro.c @@ -18,7 +18,7 @@ new_uniq_sym(pic_state *pic, pic_sym base) char *str; pic_sym uniq; - str = (char *)pic_alloc(pic, strlen(pic_symbol_name(pic, base)) + (int)log10(s) + 2); + str = (char *)pic_alloc(pic, strlen(pic_symbol_name(pic, base)) + (int)log10(s) + 3); sprintf(str, "%s@%d", pic_symbol_name(pic, base), s); uniq = pic_intern_cstr(pic, str);