From 7773949a8e370a9ffdd061dfb6a9bfbb01f3ddf9 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Tue, 23 Jun 2020 13:00:34 +0100 Subject: [PATCH] use default room format on error --- src/game.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game.rs b/src/game.rs index e66b1fb..8126cf1 100644 --- a/src/game.rs +++ b/src/game.rs @@ -163,7 +163,9 @@ impl Game { } } else if segment.starts_with("! ROOM_FORMAT") { let segment = segment.replace("! ROOM_FORMAT ", ""); - room_format = Some(RoomFormat::from(&segment).unwrap()); + room_format = Some( + RoomFormat::from(&segment).unwrap_or(RoomFormat::CommaSeparated) + ); } else if segment.starts_with("DEFAULT_FONT") { let segment = segment.replace("DEFAULT_FONT ", "");