diff options
author | Lode <lvandeve@gmail.com> | 2018-12-03 13:48:08 +0300 |
---|---|---|
committer | Lode <lvandeve@gmail.com> | 2018-12-03 13:48:08 +0300 |
commit | 2e6b2bac160f153f3890a8a10810c4a7f4ad3aed (patch) | |
tree | f107b33a536cccee0fdfc61b876e991943666c45 /pngdetail.cpp | |
parent | 190a75cef7f10873a7e575edfeaa00c24af7ab0e (diff) |
pngdetail tweaks
Diffstat (limited to 'pngdetail.cpp')
-rw-r--r-- | pngdetail.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pngdetail.cpp b/pngdetail.cpp index 030930e..98fa5fa 100644 --- a/pngdetail.cpp +++ b/pngdetail.cpp @@ -170,6 +170,10 @@ struct Data { error = lodepng::load_file(buffer, filename); //load the image file with given filename } + else + { + error = 0; // for reloadpixels, reset error if file was already successfully loaded + } } // Load header info (plus a few more nearby light chunks) if not already loaded, and the file if needed @@ -926,7 +930,8 @@ void loadWithErrorRecovery(Data& data, const Options& options) data.loadPixels(); // In case of checksum errors and some other ignorable errors, report it but ignore it and retry - while (error) { + while(error) + { // Not showing regular error here, is shown at end of program. unsigned error2 = error; if(error == 57) |