瀏覽代碼

Fix "Unicode parsing error" spam when opening editor.

Lukas Tenbrink 6 月之前
父節點
當前提交
6759d3b812
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      core/os/keyboard.cpp

+ 4 - 0
core/os/keyboard.cpp

@@ -387,6 +387,10 @@ String keycode_get_string(Key p_code) {
 	}
 
 	p_code &= KeyModifierMask::CODE_MASK;
+	if ((char32_t)p_code == 0) {
+		// The key was just a modifier without any code.
+		return codestr;
+	}
 
 	const _KeyCodeText *kct = &_keycodes[0];