aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien.hamaide <julien.hamaide@fishingcactus.com>2012-01-29 00:10:06 +0100
committerjulien.hamaide <julien.hamaide@fishingcactus.com>2012-01-29 00:10:06 +0100
commit86240efbd5b655de6111b20852fda14863ac88f3 (patch)
tree9611393955c6584db8ef742a046adc9698a8234f
parentb6ebeed2cfcebb220f2ce700c7cbe484e62cd2e2 (diff)
Fix string global name when use as a function parameter
-rw-r--r--src/parseTools.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index ad6f2830..09168179 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -385,7 +385,12 @@ function finalizeParam(param) {
if (param.type == 'i64' && I64_MODE == 1) {
return parseI64Constant(param.ident);
}
- return toNiceIdent(param.ident);
+ var ret = toNiceIdent(param.ident);
+ if (ret in Variables.globals && Variables.globals[ret].isString) {
+ ret = "STRING_TABLE." + ret;
+ }
+
+ return ret;
}
}