diff --git a/src/preview_mnist.c b/src/preview_mnist.c index d677eae..3e5ea90 100644 --- a/src/preview_mnist.c +++ b/src/preview_mnist.c @@ -15,7 +15,7 @@ uint32_t swap_endian(uint32_t val) { // commencant à l'adresse mémoire start // dans le fichier pointé par ptr void print_image(unsigned int width, unsigned int height, FILE* ptr, int start) { - unsigned char buffer[width*height+start]; + unsigned char buffer[width*height]; fread(buffer, sizeof(buffer), 1, ptr); @@ -24,7 +24,7 @@ void print_image(unsigned int width, unsigned int height, FILE* ptr, int start) for (int i=0; i