From 4873eb898a98122fd6a84e2070423b7be3c71c5a Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Tue, 30 Apr 2024 16:32:01 +0800 Subject: [PATCH] Fix building on MSVC & fix a double-free crash --- JacksEscape.vcxproj | 3 +++ JacksEscape.vcxproj.filters | 9 +++++++++ ui_build.c | 1 + 3 files changed, 13 insertions(+) diff --git a/JacksEscape.vcxproj b/JacksEscape.vcxproj index 2eb973d..08f89e4 100644 --- a/JacksEscape.vcxproj +++ b/JacksEscape.vcxproj @@ -139,6 +139,7 @@ + @@ -166,6 +167,8 @@ + + diff --git a/JacksEscape.vcxproj.filters b/JacksEscape.vcxproj.filters index e545099..191d2a7 100644 --- a/JacksEscape.vcxproj.filters +++ b/JacksEscape.vcxproj.filters @@ -84,6 +84,9 @@ 头文件 + + 头文件 + @@ -188,5 +191,11 @@ 源文件 + + 源文件 + + + 源文件 + \ No newline at end of file diff --git a/ui_build.c b/ui_build.c index ca8ab59..fa5595e 100644 --- a/ui_build.c +++ b/ui_build.c @@ -70,6 +70,7 @@ static void _ui_Action_EndIntermission(System_UI *sys, ui_Part *part, uintptr_t // should be able to just use this _ui_Action_SelectLevel(sys, part, data); free((void *)data); + ((ui_Button *)part->user)->callback_data = NULL; } }