Skip to content

Commit

Permalink
Fix typo in chunk name validation code
Browse files Browse the repository at this point in the history
  • Loading branch information
richgel999 committed Dec 27, 2021
1 parent b964f65 commit c9cf8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fpng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2519,7 +2519,7 @@ do { \

for (uint32_t i = 0; i < 4; i++)
{
const uint8_t c = pChunk->m_type[0];
const uint8_t c = pChunk->m_type[i];
const bool is_upper = (c >= 65) && (c <= 90), is_lower = (c >= 97) && (c <= 122);
if ((!is_upper) && (!is_lower))
return FPNG_DECODE_FAILED_CHUNK_PARSING;
Expand Down

0 comments on commit c9cf8cf

Please sign in to comment.