Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lvandeve/lodepng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLode <lvandeve@gmail.com>2018-12-03 13:48:08 +0300
committerLode <lvandeve@gmail.com>2018-12-03 13:48:08 +0300
commit2e6b2bac160f153f3890a8a10810c4a7f4ad3aed (patch)
treef107b33a536cccee0fdfc61b876e991943666c45 /pngdetail.cpp
parent190a75cef7f10873a7e575edfeaa00c24af7ab0e (diff)
pngdetail tweaks
Diffstat (limited to 'pngdetail.cpp')
-rw-r--r--pngdetail.cpp7
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)