Fix next/prev flag fallback

This commit is contained in:
Wuzzy 2022-07-26 16:27:04 +02:00
parent e07c633679
commit f30176ccb1

View file

@ -80,14 +80,14 @@ for f=1, #flag_list do
prev_flag[name1] = name0 prev_flag[name1] = name0
end end
local get_next_flag = function(current_flag_name) 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 return DEFAULT_FLAG
else else
return next_flag[current_flag_name] return next_flag[current_flag_name]
end end
end end
local get_prev_flag = function(current_flag_name) 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 return DEFAULT_FLAG
else else
return prev_flag[current_flag_name] return prev_flag[current_flag_name]