X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=driver.c;h=35934da1d72d711efafdb588b62dae22cdcd8e54;hb=bed2510078b46c35b95941e59327b1008e4bd176;hp=aa803d6ed00aa67266495b65df93e6582bc89151;hpb=9069ae93f3e9e9b44f5f28968f508d09f0711737;p=fjl diff --git a/driver.c b/driver.c index aa803d6..35934da 100644 --- a/driver.c +++ b/driver.c @@ -151,7 +151,7 @@ void read_scan(struct byte_source* source, struct jpeg_image* image, huffman_tab unsigned mcu_x = 0, mcu_y = 0; - for ( ;; ) { + while (!bits.source_eof) { for (unsigned c = 0; c < num_components; ++c) { unsigned cn = component_num[c]; unsigned stride = image->num_blocks_horizontal * image->hsample[cn] * DCTSIZE;