diff options
author | Lode Vandevenne <lvandeve@users.noreply.github.com> | 2016-04-11 15:03:41 +0200 |
---|---|---|
committer | Lode Vandevenne <lvandeve@users.noreply.github.com> | 2016-04-11 15:03:41 +0200 |
commit | 4949c6ded8e8292715db77357d9d302f45c892b2 (patch) | |
tree | b76f8d29e27603bcb15c9c8682bbeceacfe3b4f1 | |
parent | fbdf191b0fa5d185bf3e0a3785a75c99e68b9f6b (diff) |
fix coding error
-rw-r--r-- | lodepng.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lodepng.cpp b/lodepng.cpp index 983ecbd..59e3af9 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -4506,6 +4506,7 @@ static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h, ucvector scanlines; size_t predict; size_t numpixels; + size_t outsize; /*for unknown chunk order*/ unsigned unknown = 0; @@ -4683,7 +4684,7 @@ static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h, if(!state->error) { - size_t outsize = lodepng_get_raw_size(*w, *h, &state->info_png.color); + outsize = lodepng_get_raw_size(*w, *h, &state->info_png.color); *out = (unsigned char*)lodepng_malloc(outsize); if(!*out) state->error = 83; /*alloc fail*/ } |