Closed GoogleCodeExporter closed 9 years ago
Vesa, I'm very sorry to have ignored your valid bug report. I was on vacation
and didn't see it. You are exactly right; fscanf swallowed the 32, 10 and 9
because they're all white space.
The fix is to use fgets into a buffer, and then sscanf, for the last number
read from the header. I used a similar remedy to read data in pixcomp.c.
Version 1.72 is coming out within a week (to leptonica.org, not here -- uploads
are no longer allowed on code.google.com), and you can get it from there. Or I
can send the patched file directly to you: you are vesa.salento@aalto.fi,
correct?
Again, my apologies, and thank you for the contribution.
-- Dan
Original comment by dan.bloo...@gmail.com
on 10 Apr 2015 at 6:45
One additional thing. The second test now fails, because the maxval line does
not end with a newline. Looking at the spec, a newline is NOT required (yet
another idiocy of the format), so a lower-level approach is required.
Original comment by dan.bloo...@gmail.com
on 10 Apr 2015 at 8:55
The fix is to use fgetc repeatedly, checking each time. Fixed in 1.72.
Original comment by dan.bloo...@gmail.com
on 10 Apr 2015 at 10:43
Original issue reported on code.google.com by
vesa.sal...@gmail.com
on 1 Aug 2014 at 12:51Attachments: