aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2025-07-25 12:48:27 +0200
committerBenoit Germain <bnt.germain@gmail.com>2025-07-25 12:48:27 +0200
commitccf4ac6b44a378d8f0e32b8186fdc4d3b25c3bda (patch)
treeb58e3452d09c2a01ef773d26b79f1e78da727eae /src/lanes.cpp
parentd8acb18ce8bf6e89a042d166f61b2934e8722cf0 (diff)
downloadlanes-ccf4ac6b44a378d8f0e32b8186fdc4d3b25c3bda.tar.gz
lanes-ccf4ac6b44a378d8f0e32b8186fdc4d3b25c3bda.tar.bz2
lanes-ccf4ac6b44a378d8f0e32b8186fdc4d3b25c3bda.zip
Fix crashes in MSVC release builds related to KeeperOperationInProgress
* scope the KeeperOperationInProgress object on linda calls * but since it's not enough, just comment it, it is only debug stuff anyway
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r--src/lanes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp
index d9ac4df..4373aee 100644
--- a/src/lanes.cpp
+++ b/src/lanes.cpp
@@ -178,9 +178,13 @@ LUAG_FUNC(sleep)
178 } else if (lua_isnoneornil(L_, 1)) { 178 } else if (lua_isnoneornil(L_, 1)) {
179 lua_pushnumber(L_, 0); // L_: duration? receive() timerLinda 0 179 lua_pushnumber(L_, 0); // L_: duration? receive() timerLinda 0
180 } else if (!lua_isnumber(L_, 1)) { 180 } else if (!lua_isnumber(L_, 1)) {
181 raise_luaL_argerror(L_, StackIndex{ 1 }, "invalid duration"); 181 raise_luaL_argerror(L_, StackIndex{ 1 }, "duration must be a number");
182 } 182 }
183 else { 183 else {
184 auto const _n{ lua_tonumber(L_, 1) };
185 if (_n < 0) {
186 raise_luaL_argerror(L_, StackIndex{ 1 }, "duration must be >= 0");
187 }
184 lua_pushnumber(L_, lua_tonumber(L_, 1)); // L_: duration? receive() timerLinda duration 188 lua_pushnumber(L_, lua_tonumber(L_, 1)); // L_: duration? receive() timerLinda duration
185 } 189 }
186 luaW_pushstring(L_, "ac100de1-a696-4619-b2f0-a26de9d58ab8"); // L_: duration? receive() timerLinda duration key 190 luaW_pushstring(L_, "ac100de1-a696-4619-b2f0-a26de9d58ab8"); // L_: duration? receive() timerLinda duration key