RyanLamansky / dotnet-webassembly

Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Apache License 2.0
791 stars 74 forks source link

use the correct index for globalGetters/globallSetters arrays #8

Closed olegvs closed 5 years ago

olegvs commented 6 years ago

I'm very new to this codebase and attempted to compile some wasm from a binary and ran into an index out of range exception.

For these two lines of code I think you meant to use 'index' to index into the array instead of 'i'. Just before these two lines you do a check to make sure that 'index' is less than the length of globalGetters array.

RyanLamansky commented 6 years ago

Looks good so far. Can you add a simple test to cover the change? CompilerTests might be the best place for it.

RyanLamansky commented 5 years ago

Closing since it's been over a month with no response.