use default room format on error

This commit is contained in:
Max Bradbury 2020-06-23 13:00:34 +01:00
parent d9764b6b42
commit 7773949a8e
1 changed files with 3 additions and 1 deletions

View File

@ -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 ", "");