Issue #5735: incorrect condition because of missing parenthesis.

Also taking the opportunity to change the minimum size since I
apparently counted it wrong. The size always seems to be 46
starting from psp file-version 4 up to and including the current
version 13.
This commit is contained in:
Jacob Boerema 2020-10-08 13:54:24 -04:00
parent 37242c0466
commit 02bad34a41
1 changed files with 1 additions and 1 deletions

View File

@ -1001,7 +1001,7 @@ read_general_image_attribute_block (FILE *f,
chunk_start = ftell (f); chunk_start = ftell (f);
if ((psp_ver_major >= 4 if ((psp_ver_major >= 4
&& (fread (&init_len, 4, 1, f) < 1 || (init_len = GUINT32_FROM_LE (init_len) < 42))) && (fread (&init_len, 4, 1, f) < 1 || ((init_len = GUINT32_FROM_LE (init_len)) < 46)))
|| fread (&ia->width, 4, 1, f) < 1 || fread (&ia->width, 4, 1, f) < 1
|| fread (&ia->height, 4, 1, f) < 1 || fread (&ia->height, 4, 1, f) < 1
|| fread (&res, 8, 1, f) < 1 || fread (&res, 8, 1, f) < 1