From 749092eb2942001f1fa2f8b6fcdcbce80f1e8e37 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 26 Nov 2010 12:08:27 -0800 Subject: flatten global constants at compile time --- src/parseTools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parseTools.js') diff --git a/src/parseTools.js b/src/parseTools.js index e226b395..d2e746ca 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -380,7 +380,7 @@ function IEEEUnHex(stringy) { } function parseNumerical(value, type) { - if ((!type || type == 'double' || type == 'float') && value.substr(0,2) == '0x') { + if ((!type || type == 'double' || type == 'float') && (value.substr && value.substr(0,2) == '0x')) { // Hexadecimal double value, as the llvm docs say, // "The one non-intuitive notation for constants is the hexadecimal form of floating point constants." value = IEEEUnHex(value); -- cgit v1.2.3-70-g09d2