fix bug introduced a few commits ago: do not print the first char ('%') of a direct_variable_c (e.g. skip % in %IW4.2)
authormjsousa
Sun, 09 Nov 2014 22:02:34 +0000
changeset 944 d6d9211e9aab
parent 943 566414d7ba1f
child 947 aca1ab9fcb6d
fix bug introduced a few commits ago: do not print the first char ('%') of a direct_variable_c (e.g. skip % in %IW4.2)
stage4/generate_c/generate_c_base.cc
--- a/stage4/generate_c/generate_c_base.cc	Sat Oct 25 13:20:10 2014 +0100
+++ b/stage4/generate_c/generate_c_base.cc	Sun Nov 09 22:02:34 2014 +0000
@@ -726,7 +726,7 @@
 void *visit(direct_variable_c *symbol) {
   TRACE("direct_variable_c");
   /* Do not use print_token() as it will change everything into uppercase */
-  return s4o.printlocation(symbol->value);
+  return s4o.printlocation(symbol->value+1); // '+1' so we do not print the '%' in '%IW3.2'
 }