From e5fe40ccaf7cbf69e08728f3509da5224b1ad869 Mon Sep 17 00:00:00 2001 From: Master Builder Date: Wed, 11 Jan 2023 20:59:04 +0000 Subject: [PATCH] BUGFIX: Emulator only supported 8 save states, not 9 --- README.md | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9d9846b..e29e976 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ R = Reset NES F5 = Save save state to selected slot F7 = Load save state from selected slot -Up to 8 save states are supported, which are saved to a file with the same name as the rom but with extension `.stat.`. For cartridges that have battery-backed RAM, the data will be saved to a file with extension `.sav`. +Up to 9 save states are supported, which are saved to a file with the same name as the rom but with extension `.stat.`. For cartridges that have battery-backed RAM, the data will be saved to a file with extension `.sav`. NOTE: The emulator requires a controller to play. diff --git a/src/lib.rs b/src/lib.rs index 22bae51..1f476d8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -464,7 +464,7 @@ impl Nes { name.set_extension("stat"); - let mut states = vec![None; 8]; + let mut states = vec![None; 9]; if let Ok(mut save_file) = File::open(name) { let mut data = Vec::new();