diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-26 12:08:27 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-26 12:08:27 -0800 |
commit | 749092eb2942001f1fa2f8b6fcdcbce80f1e8e37 (patch) | |
tree | 84456630d78255e8f60dd1eaeca10c0b19ed2d95 /src/parseTools.js | |
parent | 2c8e0810292289eb17055a4fe793c24d72033dfb (diff) |
flatten global constants at compile time
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 2 |
1 files changed, 1 insertions, 1 deletions
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); |