From e547cd341f5e38e113e5b02c6c9fa93021abf63a Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sat, 11 Apr 2020 22:40:38 +0100 Subject: [PATCH] fix this copy-paste job --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));