Skip to content

Commit

Permalink
Fix a typo in LibHeifOwnedStringArrayMarshaler
Browse files Browse the repository at this point in the history
  • Loading branch information
0xC0000054 committed May 13, 2023
1 parent 8301e15 commit e3ef2da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Interop/LibHeif/LibHeifOwnedStringArrayMarshaler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ public unsafe object MarshalNativeToManaged(IntPtr pNativeData)

if (pNativeData != IntPtr.Zero)
{
var stringMemoryAdddress = (IntPtr*)pNativeData;
var stringMemoryAddress = (IntPtr*)pNativeData;

int count = 0;

while (*stringMemoryAdddress != IntPtr.Zero)
while (*stringMemoryAddress != IntPtr.Zero)
{
if (count == items.Length)
{
Expand All @@ -83,8 +83,8 @@ public unsafe object MarshalNativeToManaged(IntPtr pNativeData)
}
}

items[count++] = Marshal.PtrToStringAnsi(*stringMemoryAdddress);
stringMemoryAdddress++;
items[count++] = Marshal.PtrToStringAnsi(*stringMemoryAddress);
stringMemoryAddress++;
}

if (items.Length > count)
Expand Down

0 comments on commit e3ef2da

Please sign in to comment.