diff --git a/WebAssembly/Runtime/Compile.cs b/WebAssembly/Runtime/Compile.cs index fd84c69..4964302 100644 --- a/WebAssembly/Runtime/Compile.cs +++ b/WebAssembly/Runtime/Compile.cs @@ -735,7 +735,7 @@ void CreateMemoryField() var emptySignature = Signature.Empty; - for (var i = 0; i < globals.Length; i++) + for (var i = 0; i < count; i++) { var contentType = (WebAssemblyValueType)reader.ReadVarInt7(); var isMutable = reader.ReadVarUInt1() == 1;