aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-19 10:20:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-19 10:20:55 -0700
commit9e5680bcc0c14924b060a6d2bb609bcae5b4d62c (patch)
treeb71e951374eb24f8dd052f9952bcf41fbbb2b0ea /src/preamble.js
parent97c679e6ff1c8d0617537ce286d22159af67a264 (diff)
IE fixes
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/preamble.js b/src/preamble.js
index f1b95958..ff9af2b5 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -37,7 +37,7 @@ function SAFE_HEAP_ACCESS(dest, type, store, ignore) {
#if USE_TYPED_ARRAYS == 2
return; // It is legitimate to violate the load-store assumption in this case
#endif
- if (type && type[type.length-1] == '*') type = 'i32'; // pointers are ints, for our purposes here
+ if (type && type.charAt(type.length-1) == '*') type = 'i32'; // pointers are ints, for our purposes here
// Note that this will pass even with unions: You can store X, load X, then store Y and load Y.
// You cannot, however, do the nonportable act of store X and load Y!
if (store) {
@@ -391,7 +391,7 @@ Module["cwrap"] = cwrap;
// getValue need LLVM types ('i8', 'i32') - this is a lower-level operation
function setValue(ptr, value, type, noSafe) {
type = type || 'i8';
- if (type[type.length-1] === '*') type = 'i32'; // pointers are 32-bit
+ if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
#if SAFE_HEAP
if (noSafe) {
switch(type) {
@@ -425,7 +425,7 @@ Module['setValue'] = setValue;
// Parallel to setValue.
function getValue(ptr, type, noSafe) {
type = type || 'i8';
- if (type[type.length-1] === '*') type = 'i32'; // pointers are 32-bit
+ if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
#if SAFE_HEAP
if (noSafe) {
switch(type) {