From 2eded3f078aa0924aeafe8607b3ac0d2e89f2dfb Mon Sep 17 00:00:00 2001 From: y5nw <37980625+y5nw@users.noreply.github.com> Date: Sun, 21 Sep 2025 21:12:42 +0200 Subject: [PATCH] Add missing IsWritable checks (#16504) --- irr/src/CGUIEditBox.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irr/src/CGUIEditBox.cpp b/irr/src/CGUIEditBox.cpp index 565efc3602..5639a36a62 100644 --- a/irr/src/CGUIEditBox.cpp +++ b/irr/src/CGUIEditBox.cpp @@ -375,7 +375,7 @@ bool CGUIEditBox::processKey(const SEvent &event) } break; case KEY_INSERT: - if (!isEnabled()) + if (!isEnabled() || !IsWritable) break; OverwriteMode = !OverwriteMode; @@ -865,7 +865,7 @@ void CGUIEditBox::draw() } // draw cursor - if (isEnabled()) { + if (isEnabled() && IsWritable) { if (WordWrap || MultiLine) { cursorLine = getLineFromPos(CursorPos); txtLine = &BrokenText[cursorLine]; @@ -1312,7 +1312,7 @@ void CGUIEditBox::inputChar(wchar_t c) void CGUIEditBox::inputString(const core::stringw &str) { - if (!isEnabled()) + if (!isEnabled() || !IsWritable) return; core::stringw s;