Update code to work on mac
This commit is contained in:
		
							
								
								
									
										3
									
								
								ppm.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								ppm.c
									
									
									
									
									
								
							| @@ -10,7 +10,8 @@ void write_p6_ppm(const char *filepath, u64 width, u64 height, Pixel *data) { | ||||
|   } | ||||
|  | ||||
|   char header[1024] = {0}; | ||||
|   sprintf(header, "P6\n%lu %lu\n255\n", width, height); | ||||
|   sprintf(header, "P6\n%llu %llu\n255\n", (unsigned long long)width, | ||||
|           (unsigned long long)height); | ||||
|  | ||||
|   u64 length = strlen(header); | ||||
|   fwrite(&header, length, 1, fp); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user