summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-10-17 10:23:15 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-10-17 10:23:15 -0300
commit7060eaaa1be64f45fc9f9a56ee305e040654b43b (patch)
treefda360a9f6d1c901b8ff1775ea7b24afd413a594 /scene/gui
parent13d2710fedf0cc949ffe59b64f0ebd9c1874cbfb (diff)
parent692216b86ab97db91e7ff3903ffc9ac8e37433f6 (diff)
Merge pull request #2481 from firefly2442/cppcheck-arrayindexthencheck
ran cppcheck, fixed cases where array index is used before limits check
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index b5fdde30cd..048901a879 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -709,7 +709,7 @@ void TextEdit::_notification(int p_what) {
if (in_region==-1 && !in_keyword && is_char && !prev_is_char) {
int to=j;
- while(_is_text_char(str[to]) && to<str.length())
+ while(to<str.length() && _is_text_char(str[to]))
to++;
uint32_t hash = String::hash(&str[j],to-j);