소스 검색

GDScript: Fix `GDScriptLanguage::make_function()`

Danil Alexeev 2 달 전
부모
커밋
c8bb21e68b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/gdscript/gdscript_editor.cpp

+ 1 - 1
modules/gdscript/gdscript_editor.cpp

@@ -545,7 +545,7 @@ String GDScriptLanguage::make_function(const String &p_class, const String &p_na
 			result += name_unstripped.strip_edges();
 
 			if (type_hints) {
-				const String type_stripped = p_args[i].right(name_unstripped.length() + 1).strip_edges();
+				const String type_stripped = p_args[i].substr(name_unstripped.length() + 1).strip_edges();
 				if (!type_stripped.is_empty()) {
 					result += ": " + type_stripped;
 				}