diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2024-04-17 20:11:57 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2024-04-17 20:11:57 +0800 |
commit | 43ed8d476838d4922965fda46a800819ac3da1f3 (patch) | |
tree | cb41c0cc1f8804f2e3e5864d21f82a584f920217 | |
parent | 4b7776e31bf91bd3d710277b505c196b38d8fff3 (diff) | |
download | redot-engine-43ed8d476838d4922965fda46a800819ac3da1f3.tar.gz |
Fix potential infinite loop when using global menu
-rw-r--r-- | servers/display_server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index 351c03c158..9600caa214 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -212,7 +212,7 @@ String DisplayServer::global_menu_get_item_submenu(const String &p_menu_root, in ERR_FAIL_NULL_V(nmenu, String()); RID rid = nmenu->get_item_submenu(_get_rid_from_name(nmenu, p_menu_root), p_idx); if (!nmenu->is_system_menu(rid)) { - for (HashMap<String, RID>::Iterator E = menu_names.begin(); E;) { + for (HashMap<String, RID>::Iterator E = menu_names.begin(); E; ++E) { if (E->value == rid) { return E->key; } |