Переглянути джерело

Merge pull request #3445 from akien-mga/master

Add missing return for typeof() MethodInfo
Rémi Verschelde 9 роки тому
батько
коміт
7af864f467
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      modules/gdscript/gd_functions.cpp

+ 4 - 1
modules/gdscript/gd_functions.cpp

@@ -1355,9 +1355,12 @@ MethodInfo GDFunctions::get_info(Function p_func) {
 			return mi;
 		} break;
 		case TYPE_OF: {
+
 			MethodInfo mi("typeof",PropertyInfo(Variant::NIL,"what"));
 			mi.return_val.type=Variant::INT;
-		};
+			return mi;
+
+		} break;
 		case TEXT_STR: {
 
 			MethodInfo mi("str",PropertyInfo(Variant::NIL,"what"),PropertyInfo(Variant::NIL,"..."));