fixed bug in get_dialog_list_for_export

This commit is contained in:
Sokomine 2025-01-03 22:03:14 +01:00
parent 31434e69ce
commit 16df2f9155

View File

@ -99,7 +99,10 @@ yl_speak_up.get_dialog_list_for_export = function(dialog)
end
-- now that the list contains only normal dialogs, we can sort by d_sort
-- (thus allowing d_9 to be listed earlier than d_10 etc.)
table.sort(liste, function(a, b) return dialog.n_dialogs[a].d_sort < dialog.n_dialogs[b].d_sort end)
table.sort(liste, function(a, b)
return dialog and dialog.n_dialogs and dialog.n_dialogs[a] and dialog.n_dialogs[b]
and ((tonumber(dialog.n_dialogs[a].d_sort or "") or 0)
< (tonumber(dialog.n_dialogs[b].d_sort or "") or 0)) end)
return liste
end