Skip to content

Commit

Permalink
InputText: amends: fixes character filtering.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Sep 11, 2024
1 parent a118e54 commit 1af5884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4854,11 +4854,11 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
{
unsigned int c;
int len = ImTextCharFromUtf8(&c, s, NULL);
s += len;
if (!InputTextFilterCharacter(&g, &c, flags, callback, callback_user_data, true))
continue;
memcpy(clipboard_filtered + clipboard_filtered_len, s, len);
memcpy(clipboard_filtered + clipboard_filtered_len, s - len, len);
clipboard_filtered_len += len;
s += len;
}
clipboard_filtered[clipboard_filtered_len] = 0;
if (clipboard_filtered_len > 0) // If everything was filtered, ignore the pasting operation
Expand Down

0 comments on commit 1af5884

Please sign in to comment.