From: Wolfgang Bumiller Date: Thu, 20 Dec 2012 22:27:23 +0000 (+0100) Subject: minor: fix ast_function_label X-Git-Tag: 0.2~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5375400e85befc16700893b16e7151559d76a765;p=xonotic%2Fgmqcc.git minor: fix ast_function_label --- diff --git a/ast.c b/ast.c index 04e13b8..23ed28a 100644 --- a/ast.c +++ b/ast.c @@ -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; }