bug fix: correctly calculating String start/end.

internals
Zaafar 4 years ago committed by Eric Mellino
parent 0e6ed64e5c
commit 33aefc005c
  1. 2
      src/ImGui.NET/ImGui.Manual.cs

@ -384,7 +384,7 @@ namespace ImGuiNET
int nativeTextOffset = Util.GetUtf8(text, nativeText, textByteCount);
nativeText[nativeTextOffset] = 0;
nativeTextStart = nativeText + (start.HasValue ? (start.Value * textByteSize) : 0);
nativeTextEnd = length.HasValue ? nativeTextStart + (length.Value + textByteSize) : null;
nativeTextEnd = length.HasValue ? nativeTextStart + (length.Value * textByteSize) : null;
}
ImGuiNative.igCalcTextSize(&ret, nativeTextStart, nativeTextEnd, *((byte*)(&hideTextAfterDoubleHash)), wrapWidth);

Loading…
Cancel
Save