Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/game/client/neo/ui/neo_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,11 @@ void SliderU8(const wchar_t *wszLeftLabel, uint8 *ucValue, const uint8 iMin, con

static int TextEditChIdxFromMouse(const int iWszTextSize)
{
if (iWszTextSize <= 0)
{
return 0;
}

const int iMouseOnXWidth = c->iMouseAbsX - (c->rWidgetArea.x0 + c->iMarginX);
int iChIdx = -1;
for (int i = 0; i < iWszTextSize; ++i)
Expand Down Expand Up @@ -2428,7 +2433,7 @@ void TextEdit(wchar_t *wszText, const int iMaxWszTextSize, const TextEditFlags f
static wchar_t wszStaticTmpText[MAX_TEXTINPUT_U8BYTES_LIMIT];
if (bFromEnd)
{
V_wcsncat(wszText, wszClipboard, iMaxWszTextSize + 1);
V_wcsncat(wszText, wszClipboard, (size_t)iMaxWszTextSize + 1);
c->iTextSelCur = V_wcslen(wszText);
}
else if (bIsCursor)
Expand Down