aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--zluda_dump/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/zluda_dump/src/lib.rs b/zluda_dump/src/lib.rs
index 768d6f1..4ea449c 100644
--- a/zluda_dump/src/lib.rs
+++ b/zluda_dump/src/lib.rs
@@ -191,7 +191,7 @@ unsafe fn record_module_image(module: CUmodule, image: &str) {
unsafe fn try_dump_module_image(image: &str) -> Result<(), Box<dyn Error>> {
let mut dump_path = get_dump_dir()?;
- dump_path.push(format!("module_{:04}.ptx", MODULES.as_ref().unwrap().len()));
+ dump_path.push(format!("module_{:04}.ptx", MODULES.as_ref().unwrap().len() - 1));
let mut file = File::create(dump_path)?;
file.write_all(image.as_bytes())?;
Ok(())