aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
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