From 0c48ac69632ff6137d8f62d578e2f3dbc2d56ec2 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 22 Dec 2015 20:55:41 +0000 Subject: MirLua: - safety check git-svn-id: http://svn.miranda-ng.org/main/trunk@15936 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_schedule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/MirLua') 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); -- cgit v1.2.3