Skip to content

Commit

Permalink
Fixed memory example
Browse files Browse the repository at this point in the history
  • Loading branch information
martindevans committed Mar 15, 2023
1 parent ffa88ab commit 7e2d02a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/memory/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"log",
Function.FromCallback(store, (Caller caller, int address, int length) =>
{
var message = caller.GetMemory("mem").ReadString(address, length);
var message = caller.GetMemory("mem")?.ReadString(address, length);
Console.WriteLine($"Message from WebAssembly: {message}");
}
));
Expand Down

0 comments on commit 7e2d02a

Please sign in to comment.