aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-03-17 17:40:26 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-03-17 17:40:26 +0100
commit025b20005f8988b28fa3bd429adca6fe279edcbc (patch)
tree997420d3ac9eaa5ecf15980bad9cff3647605534 /src
parent7acc7867a8ebee0a3467a382b6998cb4e95580ed (diff)
downloadlanes-025b20005f8988b28fa3bd429adca6fe279edcbc.tar.gz
lanes-025b20005f8988b28fa3bd429adca6fe279edcbc.tar.bz2
lanes-025b20005f8988b28fa3bd429adca6fe279edcbc.zip
Circumvent MSVC possible bug causing a crash in optimized builds
Diffstat (limited to 'src')
-rw-r--r--src/universe.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index db00b72..89ad02a 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -451,7 +451,9 @@ int Universe::UniverseGC(lua_State* const L_)
451 } else { 451 } else {
452 // take the value returned by the finalizer (or our default message) and throw it as an error 452 // take the value returned by the finalizer (or our default message) and throw it as an error
453 // since we are inside Lua's GCTM, it will be propagated through the warning system (Lua 5.4) or swallowed silently 453 // since we are inside Lua's GCTM, it will be propagated through the warning system (Lua 5.4) or swallowed silently
454 raise_lua_error(L_); 454 // IMPORTANT: lua_error() is used here instead of the wrapper raise_lua_error() to circumvent what looks like a MSVC compiler bug
455 // that manifests as a crash inside ntdll!longjmp() function, in optimized builds only
456 lua_error(L_);
455 } 457 }
456 } 458 }
457 459