Skip to content

Commit 33aefc0

Browse files
zaafarmellinoe
authored andcommitted
bug fix: correctly calculating String start/end.
1 parent 0e6ed64 commit 33aefc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ImGui.NET/ImGui.Manual.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public static Vector2 CalcTextSize(
384384
int nativeTextOffset = Util.GetUtf8(text, nativeText, textByteCount);
385385
nativeText[nativeTextOffset] = 0;
386386
nativeTextStart = nativeText + (start.HasValue ? (start.Value * textByteSize) : 0);
387-
nativeTextEnd = length.HasValue ? nativeTextStart + (length.Value + textByteSize) : null;
387+
nativeTextEnd = length.HasValue ? nativeTextStart + (length.Value * textByteSize) : null;
388388
}
389389

390390
ImGuiNative.igCalcTextSize(&ret, nativeTextStart, nativeTextEnd, *((byte*)(&hideTextAfterDoubleHash)), wrapWidth);

0 commit comments

Comments
 (0)