]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
minor: fix ast_function_label
authorWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 22:27:23 +0000 (23:27 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 22:27:23 +0000 (23:27 +0100)
ast.c

diff --git a/ast.c b/ast.c
index 04e13b8e6d5f96eca84bdedb14b494776989ca3c..23ed28ab12c74b6a7be67f1bc5fcf4911c07eec5 100644 (file)
--- 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;
 }