Fix out of bound access

This commit is contained in:
Dale Weiler 2013-06-22 01:16:24 +00:00
parent d39fb653aa
commit 5429b6f189

2
ir.c
View file

@ -3779,7 +3779,7 @@ void ir_function_dump(ir_function *f, char *ind,
return;
}
oprintf("%sfunction %s\n", ind, f->name);
strncat(ind, "\t", IND_BUFSZ);
strncat(ind, "\t", IND_BUFSZ-1);
if (vec_size(f->locals))
{
oprintf("%s%i locals:\n", ind, (int)vec_size(f->locals));