diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/text/text_server_gdnative.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 6 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/modules/gdnative/text/text_server_gdnative.cpp b/modules/gdnative/text/text_server_gdnative.cpp index 195c32c3f8..39db8ae636 100644 --- a/modules/gdnative/text/text_server_gdnative.cpp +++ b/modules/gdnative/text/text_server_gdnative.cpp @@ -383,7 +383,7 @@ Vector2 TextServerGDNative::font_get_glyph_size(RID p_font_rid, const Vector2i & void TextServerGDNative::font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) { ERR_FAIL_COND(interface == nullptr); - interface->font_set_glyph_size(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph, (const godot_vector2 *)&p_size); + interface->font_set_glyph_size(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph, (const godot_vector2 *)&p_gl_size); } Rect2 TextServerGDNative::font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const { diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 029e30080b..d202bd4420 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -2380,7 +2380,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_assignment(ExpressionNode GDScriptParser::ExpressionNode *GDScriptParser::parse_await(ExpressionNode *p_previous_operand, bool p_can_assign) { AwaitNode *await = alloc_node<AwaitNode>(); - await->to_await = parse_precedence(PREC_AWAIT, false); + ExpressionNode *element = parse_precedence(PREC_AWAIT, false); + if (element == nullptr) { + push_error(R"(Expected signal or coroutine after "await".)"); + } + await->to_await = element; current_function->is_coroutine = true; diff --git a/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd b/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd index ad1694de81..9e48a7f0da 100644 --- a/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd +++ b/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd @@ -1,7 +1,7 @@ func test(): var null_var = null - var true_var:bool = true - var false_var:bool = false + var true_var: bool = true + var false_var: bool = false print(str(null_var)) print(str(true_var)) print(str(false_var)) |