diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 14:35:50 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 14:35:50 +1100 |
| commit | 7ea1ad03b5a86e75dfa1d3c381487fa11d09b460 (patch) | |
| tree | 5300c1f11c7b6b004d2ba57911c21184e300758f /src/format/image | |
| parent | 9e6aa66379236bbf250f9618571d0d8fc1e86766 (diff) | |
refactor(png): Cast iline to uint32_t in scanline iteration loop
Diffstat (limited to 'src/format/image')
| -rw-r--r-- | src/format/image/png.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/format/image/png.c b/src/format/image/png.c index 7b203f5..29facd4 100644 --- a/src/format/image/png.c +++ b/src/format/image/png.c @@ -1,4 +1,5 @@ #include <tinyff/image/png.h> +#include "result.h" #include "tinyff/dbg.h" ff_result ff_png_isvalid(ff_stream *stream) @@ -214,7 +215,7 @@ ff_result ff_png_data_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) // Iterate over every scanline - for (int iline = 0; iline < ctx->height; iline++) { + for (int iline = 0; (uint32_t) iline < ctx->height; iline++) { // Make some variables so it's not hella unreadable size_t scanline_start = iline * (1 + (ctx->width * bpp)); uint8_t filter_type = uncompressed_data[scanline_start]; @@ -354,4 +355,6 @@ ff_result ff_png_trans_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) return FF_RESULT_ERROR_INVALID_FILE; } } + + return FF_RESULT_WARN_NO_IMPL; } |
