Fix CID 1134490

This commit is contained in:
Anton Kochkov 2014-04-26 01:27:43 +04:00
parent 51736bd435
commit d5d32e333f

View File

@ -108,7 +108,7 @@ static void emit_arg (REgg *egg, int xs, int num, const char *str) {
case 0:
if (strchr (str, ',')) {
//r_egg_printf (egg, ". str r0, [%s]\n", str);
strncpy (lastargs[num-1], str, sizeof(lastargs[0]));
strncpy (lastargs[num-1], str, sizeof(lastargs[0])-1);
} else {
if (!atoi (str)) eprintf ("WARNING: probably a bug?\n");
r_egg_printf (egg, " mov r0, $%s\n", str);