diff options
author | Mathis Rosenhauer <rosenhauer@dkrz.de> | 2014-07-29 09:28:04 +0200 |
---|---|---|
committer | Mathis Rosenhauer <rosenhauer@dkrz.de> | 2014-07-29 09:28:04 +0200 |
commit | 36c5013fc6a9e2f504fe8a49c34ad31de8fbb40d (patch) | |
tree | a09ab0562a36c65626fd4f5895292ee1ee56da94 /src | |
parent | 4574601be9fd2e710ec8de6d894d0990f8c5e4a0 (diff) | |
download | libaec-36c5013fc6a9e2f504fe8a49c34ad31de8fbb40d.tar.gz libaec-36c5013fc6a9e2f504fe8a49c34ad31de8fbb40d.tar.bz2 libaec-36c5013fc6a9e2f504fe8a49c34ad31de8fbb40d.zip |
Choose padding value correctly.
Diffstat (limited to 'src')
-rw-r--r-- | src/sz_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sz_compat.c b/src/sz_compat.c index 26ebda0..91ccad7 100644 --- a/src/sz_compat.c +++ b/src/sz_compat.c @@ -81,7 +81,7 @@ static size_t add_padding(void *dest, const void *src, size_t total, memcpy((char *)dest + j, (char *)src + i, line_size); j += line_size; if (pp) - pixel = (char *)src + i - 1; + pixel = (char *)src + i + line_size - pixel_size; for (k = 0; k < padding_size; k += pixel_size) memcpy((char *)dest + j + k, pixel, pixel_size); j += padding_size; |