Commit d42548aec13093f0e30edf69632e67ad56a0cec2
Interface: fix callDataCopy
Alex Beregszaszi committed on 8/17/2016, 6:12:24 PMParent: 98b84bb83ad7584f27dafa1f666441f421e0fb44
Files changed
interface.js | changed |
tests/interface/callDataCopy.wast | changed |
interface.js | ||
---|---|---|
@@ -143,9 +143,9 @@ | ||
143 | 143 | * @param {integer} dataOffset the offset in the input data |
144 | 144 | * @param {integer} length the length of data to copy |
145 | 145 | */ |
146 | 146 | callDataCopy (offset, dataOffset, length) { |
147 | - const callData = Buffer.from(this.environment.callData.slice(dataOffset, dataOffset + length)).reverse() | |
147 | + const callData = this.environment.callData.slice(dataOffset, dataOffset + length) | |
148 | 148 | this.setMemory(offset, length, callData) |
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
tests/interface/callDataCopy.wast | ||
---|---|---|
@@ -8,10 +8,9 @@ | ||
8 | 8 | (func |
9 | 9 | (block |
10 | 10 | (call_import $callDataCopy (i32.const 0) (i32.const 0) (i32.const 8)) |
11 | 11 | |
12 | - ;; FIXME: this should be 0x2065726120756f59 | |
13 | - (if (i64.eq (i64.load (i32.const 0)) (i64.const 0x596f752061726520)) | |
12 | + (if (i64.eq (i64.load (i32.const 0)) (i64.const 0x2065726120756f59)) | |
14 | 13 | (return) |
15 | 14 | ) |
16 | 15 | (unreachable) |
17 | 16 | ) |
Built with git-ssb-web