Browse Source
Ensure marshaled UTF-8 string arrays are null terminated.
pull/977/head
Peter Huene
5 years ago
No known key found for this signature in database
GPG Key ID: E1D265D820213D6A
1 changed files with
1 additions and
1 deletions
-
crates/misc/dotnet/src/Interop.cs
|
|
@ -499,7 +499,7 @@ namespace Wasmtime |
|
|
|
for (int i = 0; i < strings.Count; ++i) |
|
|
|
{ |
|
|
|
handles[i] = GCHandle.Alloc( |
|
|
|
Encoding.UTF8.GetBytes(strings[i]), |
|
|
|
Encoding.UTF8.GetBytes(strings[i] + '\0'), |
|
|
|
GCHandleType.Pinned |
|
|
|
); |
|
|
|
} |
|
|
|