Fixes crash reported in #29

Initialise last_pos if nil to prevent crash
master
shivajiva101 2019-11-26 09:29:43 +00:00 committed by GitHub
parent af9d1c41dd
commit e269b6dfd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1357,6 +1357,7 @@ local function process_expired_bans()
if type(row.expires) == "number" and row.expires ~= 0 then
-- temp ban
if ts > row.expires then
row.last_pos = row.last_pos or "" -- can't be nil!
-- add sql statements
tq[#tq+1] = ([[
INSERT INTO expired VALUES (%i,'%s','%s',%i,'%s',%i,'sban','tempban expired',%i,'%s');