Fix next/prev flag fallback

master
Wuzzy 2022-07-26 16:27:04 +02:00
parent e07c633679
commit f30176ccb1
1 changed files with 2 additions and 2 deletions

View File

@ -80,14 +80,14 @@ for f=1, #flag_list do
prev_flag[name1] = name0
end
local get_next_flag = function(current_flag_name)
if not current_flag_name then
if not current_flag_name or not next_flag[ current_flag_name ] then
return DEFAULT_FLAG
else
return next_flag[current_flag_name]
end
end
local get_prev_flag = function(current_flag_name)
if not current_flag_name then
if not current_flag_name or not prev_flag[ current_flag_name ] then
return DEFAULT_FLAG
else
return prev_flag[current_flag_name]