]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
actually print the prototype's file+line, not the current one
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 12:19:44 +0000 (14:19 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 12:19:44 +0000 (14:19 +0200)
parser.c

index 05c4313f8bb22ff127b2079e57e91104d32cf638..bfd036ffe08607093eee41fc6e61243745260d20 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1483,7 +1483,7 @@ static bool parser_variable(parser_t *parser, ast_block *localblock)
             if (proto) {
                 if (!ast_compare_type((ast_expression*)proto, (ast_expression*)fval)) {
                     parseerror(parser, "prototype declared at %s:%i had a different type",
-                               ast_ctx(fval).file, ast_ctx(fval).line);
+                               ast_ctx(proto).file, ast_ctx(proto).line);
                     ast_function_delete(func);
                     ast_value_delete(fval);
                     return false;