mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-20 10:28:35 +00:00
InputTextWithHint(): Fixed buffer overflow when user callback modifies the buffer contents in a way that alters hint visibility. (#8368)
This commit is contained in:
@@ -2012,6 +2012,7 @@ const char* ImStreolRange(const char* str, const char* str_end)
|
||||
|
||||
const char* ImStrbol(const char* buf_mid_line, const char* buf_begin) // find beginning-of-line
|
||||
{
|
||||
IM_ASSERT_PARANOID(buf_mid_line >= buf_begin && buf_mid_line <= buf_begin + strlen(buf_begin));
|
||||
while (buf_mid_line > buf_begin && buf_mid_line[-1] != '\n')
|
||||
buf_mid_line--;
|
||||
return buf_mid_line;
|
||||
|
||||
Reference in New Issue
Block a user