Skip to content

Commit

Permalink
Renamed memmem routine to memmem_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
iratahack committed Nov 16, 2024
1 parent 27822fa commit 04e8278
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zxctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static uint16_t _htole16(uint16_t value)
return (value);
}

int memmem(unsigned char *data, int dataLen, unsigned char *subData, int subDataLen)
int memmem_offset(unsigned char *data, int dataLen, unsigned char *subData, int subDataLen)
{
int match;
for (int d = 0; d < dataLen; d++)
Expand Down Expand Up @@ -353,7 +353,7 @@ int main(int argc, char **argv)
unsigned char val[] =
{ 0x56, 0x05 };
// find the call to LD_BYTES
unsigned int offset = memmem(loader_bin, loader_bin_len, val, 2);
unsigned int offset = memmem_offset(loader_bin, loader_bin_len, val, 2);

*((uint16_t*) &loader_bin[offset]) = _htole16(0xc000 - 160);

Expand Down

0 comments on commit 04e8278

Please sign in to comment.