[bugfix] new_uniq_sym must take one more byte chunk for new string

This commit is contained in:
Yuichi Nishiwaki 2013-11-27 06:31:12 -08:00
parent 7b8ee3eb97
commit 49caf79ce6
1 changed files with 1 additions and 1 deletions

View File

@ -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);