Commit 9b99d153421b050c83a444b213cdd1f70243c05a
Merge pull request #50 from ewasm/logFix
add check to log for 0 length datawanderer authored on 9/6/2016, 2:49:00 PM
GitHub committed on 9/6/2016, 2:49:00 PM
Parent: f51b785e3c8a0cb4cdd5b659a4410b44e414b871
Parent: 346ba767989fadca43b46f98230682c61d798a98
Files changed
interface.js | changed |
interface.js | ||
---|---|---|
@@ -329,10 +329,10 @@ | ||
329 | 329 | } |
330 | 330 | |
331 | 331 | this.takeGas(375 + length * 8 + numberOfTopics * 375) |
332 | 332 | |
333 | - const data = this.getMemory(dataOffset, length).slice(0) | |
334 | - let topics = [] | |
333 | + const data = length ? this.getMemory(dataOffset, length).slice(0) : new Uint8Array([]) | |
334 | + const topics = [] | |
335 | 335 | |
336 | 336 | if (numberOfTopics > 0) { |
337 | 337 | topics.push(U256.fromMemory(this.getMemory(topic1, U256_SIZE_BYTES))) |
338 | 338 | } |
Built with git-ssb-web