git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 3c2192ab4c4610302da22858ac40084fe5db349d

added code check to create

wanderer committed on 11/14/2016, 11:23:19 AM
Parent: 346aa8e29c19c848a5fa994e486e5bd6f5842c44

Files changed

EVMinterface.jschanged
EVMinterface.jsView
@@ -427,9 +427,12 @@
427427 create (valueOffset, dataOffset, length, resultOffset, cbIndex) {
428428 this.takeGas(32000)
429429
430430 const value = U256.fromMemory(this.getMemory(valueOffset, U128_SIZE_BYTES))
431- const code = this.getMemory(dataOffset, length).slice(0)
431+ if (length) {
432+ const code = this.getMemory(dataOffset, length).slice(0)
433+ }
434+
432435 let opPromise
433436
434437 if (value.gt(this.kernel.environment.value)) {
435438 opPromise = Promise.resolve(new Address())
@@ -480,9 +483,8 @@
480483
481484 // const [errorCode, result] = this.environment.call(gas, address, value, data)
482485 // this.setMemory(resultOffset, resultLength, result)
483486 // return errorCode
484- //
485487 return 1
486488 }
487489
488490 /**

Built with git-ssb-web