summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/m_schedule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_schedule.cpp b/plugins/MirLua/src/m_schedule.cpp
index ca9a04e271..ce4e2ea8f9 100644
--- a/plugins/MirLua/src/m_schedule.cpp
+++ b/plugins/MirLua/src/m_schedule.cpp
@@ -377,7 +377,8 @@ static int lua__From(lua_State *L)
lua_gettable(L, 1);
int interval = luaL_optinteger(L, -1, 1);
lua_pop(L, 1);
- startTime += (((timestamp - startTime) / interval) + 1) * interval;
+ if (interval > 0)
+ startTime += (((timestamp - startTime) / interval) + 1) * interval;
}
lua_pushvalue(L, 1);