Define lynx_header_len at the function head
This commit is contained in:
parent
cdbfec7348
commit
b1de875551
|
@ -2572,6 +2572,7 @@ enum
|
||||||
static int cheevos_iterate(coro_t *coro)
|
static int cheevos_iterate(coro_t *coro)
|
||||||
{
|
{
|
||||||
const int snes_header_len = 0x200;
|
const int snes_header_len = 0x200;
|
||||||
|
const int lynx_header_len = 0x40;
|
||||||
ssize_t num_read = 0;
|
ssize_t num_read = 0;
|
||||||
size_t to_read = 4096;
|
size_t to_read = 4096;
|
||||||
uint8_t *buffer = NULL;
|
uint8_t *buffer = NULL;
|
||||||
|
@ -2958,8 +2959,6 @@ found:
|
||||||
/* Checks for the existence of a headered Lynx file.
|
/* Checks for the existence of a headered Lynx file.
|
||||||
Unheadered files fall back to GENERIC_MD5. */
|
Unheadered files fall back to GENERIC_MD5. */
|
||||||
|
|
||||||
const int lynx_header_len = 0x40;
|
|
||||||
|
|
||||||
if (coro->len <= lynx_header_len ||
|
if (coro->len <= lynx_header_len ||
|
||||||
memcmp("LYNX", (void *)coro->data, 5) != 0)
|
memcmp("LYNX", (void *)coro->data, 5) != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue