From a8850eb8bf508b245cb8bf60bd51204e623b5e49 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Mon, 19 Feb 2024 00:49:47 +0200 Subject: [PATCH] fix crash --- CMakeLists.txt | 8 +++++++- changelog.md | 4 ++++ mod.json | 2 +- src/features/GridScaling.cpp | 7 +++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcfc0922..5b8772fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,5 +38,11 @@ endif() if(MSVC) target_compile_options(${PROJECT_NAME} PRIVATE /W4) else() - target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Wno-dollar-in-identifier-extension) + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wpedantic + # $override, $modify, etc. should be allowed + -Wno-dollar-in-identifier-extension + # Class init functions all overload a virtual + -Wno-overloaded-virtual + ) endif() diff --git a/changelog.md b/changelog.md index 4d7830c1..f5640389 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,8 @@ +## v6.3.1 + + * Fix crash when placing objects, as well as grid size not working + ## v6.3.0 * Add Next Free Offset for Group IDs diff --git a/mod.json b/mod.json index 7acd29fe..d183852e 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "geode": "2.0.0-beta.20", - "version": "v6.3.0", + "version": "v6.3.1", "gd": { "win": "2.204", "mac": "2.200", diff --git a/src/features/GridScaling.cpp b/src/features/GridScaling.cpp index a773fcf9..7ca0a273 100644 --- a/src/features/GridScaling.cpp +++ b/src/features/GridScaling.cpp @@ -9,7 +9,14 @@ class $modify(ObjectToolbox) { float gridNodeSizeForKey(int id) { auto size = Mod::get()->template getSavedValue("grid-size"); if (size < 1 || roundf(size) == 30) { + #ifdef GEODE_IS_WINDOWS + ObjectToolbox::gridNodeSizeForKey(id); + float real; + __asm movss real, xmm0 + return real; + #else return ObjectToolbox::gridNodeSizeForKey(id); + #endif } return size; }