diff --git a/src/CodeGenerator/Program.cs b/src/CodeGenerator/Program.cs index 718d479..5711383 100644 --- a/src/CodeGenerator/Program.cs +++ b/src/CodeGenerator/Program.cs @@ -660,8 +660,8 @@ namespace CodeGenerator preCallLines.Add($" fixed (char* sPtr = s)"); preCallLines.Add(" {"); preCallLines.Add($" offset += Encoding.UTF8.GetBytes(sPtr, s.Length, {nativeArgName}_data + offset, {correctedIdentifier}_byteCounts[i]);"); - preCallLines.Add($" offset += 1;"); preCallLines.Add($" {nativeArgName}_data[offset] = 0;"); + preCallLines.Add($" offset += 1;"); preCallLines.Add(" }"); preCallLines.Add("}"); diff --git a/src/ImGui.NET/Generated/ImGui.gen.cs b/src/ImGui.NET/Generated/ImGui.gen.cs index 327d4c5..28a413c 100644 --- a/src/ImGui.NET/Generated/ImGui.gen.cs +++ b/src/ImGui.NET/Generated/ImGui.gen.cs @@ -77,8 +77,8 @@ namespace ImGuiNET fixed (char* sPtr = s) { offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - offset += 1; native_items_data[offset] = 0; + offset += 1; } } byte** native_items = stackalloc byte*[items.Length]; @@ -126,8 +126,8 @@ namespace ImGuiNET fixed (char* sPtr = s) { offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - offset += 1; native_items_data[offset] = 0; + offset += 1; } } byte** native_items = stackalloc byte*[items.Length]; @@ -4901,8 +4901,8 @@ namespace ImGuiNET fixed (char* sPtr = s) { offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - offset += 1; native_items_data[offset] = 0; + offset += 1; } } byte** native_items = stackalloc byte*[items.Length]; @@ -4950,8 +4950,8 @@ namespace ImGuiNET fixed (char* sPtr = s) { offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - offset += 1; native_items_data[offset] = 0; + offset += 1; } } byte** native_items = stackalloc byte*[items.Length];