Fix bug with PPM writing
This commit is contained in:
		| @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) { | |||||||
|   char max[] = {'2', '5', '5', '\n'}; |   char max[] = {'2', '5', '5', '\n'}; | ||||||
|   fwrite(max, sizeof(max), 1, out); |   fwrite(max, sizeof(max), 1, out); | ||||||
|  |  | ||||||
|   for (u64 i = 0; i < img->buf_length; i += 4) { |   for (u64 i = 0; i < img->pixel_count; ++i) { | ||||||
|     fwrite(&(img->data[i]), sizeof(u8), 3, out); |     fwrite(&(img->data[i]), sizeof(u8), 3, out); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user