소스 검색

Merge pull request #57229 from cdemirer/match-dictionary-non-const-key-crash-fix

Rémi Verschelde 3 년 전
부모
커밋
b25c7fef04
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/gdscript/gdscript_analyzer.cpp

+ 1 - 1
modules/gdscript/gdscript_analyzer.cpp

@@ -1586,7 +1586,7 @@ void GDScriptAnalyzer::resolve_match_pattern(GDScriptParser::PatternNode *p_matc
 				if (p_match_pattern->dictionary[i].key) {
 					reduce_expression(p_match_pattern->dictionary[i].key);
 					if (!p_match_pattern->dictionary[i].key->is_constant) {
-						push_error(R"(Expression in dictionary pattern key must be a constant.)", p_match_pattern->expression);
+						push_error(R"(Expression in dictionary pattern key must be a constant.)", p_match_pattern->dictionary[i].key);
 					}
 				}