From 85aaacf39309bb67708920d35e03d72a9f174ac8 Mon Sep 17 00:00:00 2001 From: Chris Cranford <chris@hibernate.org> Date: Mon, 1 Jan 2024 08:09:00 -0500 Subject: [PATCH] GH-48 Fix rendering of "Update Available" on dev builds --- src/editor/main_view.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/editor/main_view.cpp b/src/editor/main_view.cpp index e1717a01..2cfa5c6d 100644 --- a/src/editor/main_view.cpp +++ b/src/editor/main_view.cpp @@ -536,7 +536,16 @@ void OrchestratorMainView::_navigate_to_current_path() int OrchestratorMainView::_parse_version(const String& p_version) { PackedStringArray bits = p_version.split("."); - return bits[0].to_int() * 1000000 + bits[1].to_int() * 1000 + bits[2].to_int(); + + int version = 0; + if (bits[0].is_valid_int()) + version += bits[0].to_int() * 1000000; + if (bits[1].is_valid_int()) + version += bits[1].to_int() * 1000; + if (bits[2].is_valid_int()) + version += bits[2].to_int(); + + return version; } void OrchestratorMainView::_show_script_editor_view(const String& p_file_name)