Commit 3c2192ab4c4610302da22858ac40084fe5db349d
added code check to create
wanderer committed on 11/14/2016, 11:23:19 AMParent: 346aa8e29c19c848a5fa994e486e5bd6f5842c44
Files changed
EVMinterface.js | changed |
EVMinterface.js | ||
---|---|---|
@@ -427,9 +427,12 @@ | ||
427 | 427 | create (valueOffset, dataOffset, length, resultOffset, cbIndex) { |
428 | 428 | this.takeGas(32000) |
429 | 429 | |
430 | 430 | 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 | + | |
432 | 435 | let opPromise |
433 | 436 | |
434 | 437 | if (value.gt(this.kernel.environment.value)) { |
435 | 438 | opPromise = Promise.resolve(new Address()) |
@@ -480,9 +483,8 @@ | ||
480 | 483 | |
481 | 484 | // const [errorCode, result] = this.environment.call(gas, address, value, data) |
482 | 485 | // this.setMemory(resultOffset, resultLength, result) |
483 | 486 | // return errorCode |
484 | - // | |
485 | 487 | return 1 |
486 | 488 | } |
487 | 489 | |
488 | 490 | /** |
Built with git-ssb-web