rogueviz:: crystal-sokoban:: fixed a crash when undoing in an empty history

This commit is contained in:
Zeno Rogue
2025-08-29 02:06:50 +02:00
parent 3133439b19
commit 5ea720c978
+1
View File
@@ -115,6 +115,7 @@ void save_undo() {
}
void restore_undo() {
if(undos.empty()) return;
undos.pop_back();
auto& u = undos.back();
cwt.at = u.where;