diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 7792ed537b..0c3a34bc7e 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -19,6 +19,7 @@ - Fix: [#22304] Graphs don't draw lines on the left edge of the screen. - Fix: [#22318] Water sparkles are missing if transparent water is enabled without RCT1 linked. - Fix: [#22333] Tile inspector closes other tool windows. +- Fix: [#22339] Printing ui.tool.cursor in console crashes the game. - Fix: [#22348] Progress bar screen doesn't handle window resizing. 0.4.12 (2024-07-07) diff --git a/src/openrct2-ui/scripting/CustomMenu.cpp b/src/openrct2-ui/scripting/CustomMenu.cpp index 4f48daed29..c9821dea16 100644 --- a/src/openrct2-ui/scripting/CustomMenu.cpp +++ b/src/openrct2-ui/scripting/CustomMenu.cpp @@ -86,9 +86,9 @@ namespace OpenRCT2::Scripting { auto str = CursorNames[value]; duk_push_lstring(ctx, str.data(), str.size()); - DukValue::take_from_stack(ctx); + return DukValue::take_from_stack(ctx); } - return {}; + return ToDuk(ctx, undefined); } template<> CursorID FromDuk(const DukValue& s)