diff --git a/src/main.rs b/src/main.rs index b64ee4f..6169363 100644 --- a/src/main.rs +++ b/src/main.rs @@ -315,7 +315,7 @@ fn test_image_from_string() { fn image_to_string(image: Image) -> String { let mut string = String::new(); - let sqrt = (room.tiles.len() as f64).sqrt() as usize; // 8 for SD, 16 for HD + let sqrt = (image.pixels.len() as f64).sqrt() as usize; // 8 for SD, 16 for HD for line in image.pixels.chunks(sqrt) { for pixel in line { string.push_str(&format!("{}", *pixel));