minor: fix ast_function_label

This commit is contained in:
Wolfgang Bumiller 2012-12-20 23:27:23 +01:00
parent 1d3fdea432
commit 5375400e85

4
ast.c
View file

@ -1061,10 +1061,10 @@ const char* ast_function_label(ast_function *self, const char *prefix)
from = self->labelbuf + sizeof(self->labelbuf)-1;
*from-- = 0;
do {
unsigned int digit = id % 10;
*from = digit + '0';
*from-- = (id%10) + '0';
id /= 10;
} while (id);
++from;
memcpy(from - len, prefix, len);
return from - len;
}