diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-10-17 10:23:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-10-17 10:23:15 -0300 |
commit | 7060eaaa1be64f45fc9f9a56ee305e040654b43b (patch) | |
tree | fda360a9f6d1c901b8ff1775ea7b24afd413a594 /scene/gui | |
parent | 13d2710fedf0cc949ffe59b64f0ebd9c1874cbfb (diff) | |
parent | 692216b86ab97db91e7ff3903ffc9ac8e37433f6 (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.cpp | 2 |
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); |