You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch

21 lines
609 B

--- a/backup/lynxit.c
+++ b/backup/lynxit.c
@@ -561,7 +561,7 @@
return FALSE;
}
- if (strcmp (header.magic, "LYNX") != 0)
+ if (memcmp (header.magic, "LYNX", sizeof(header.magic)) != 0)
{
MESSAGE (("ERROR : %s is not a lynx image\n", filename));
fclose (fp);
@@ -682,7 +682,7 @@
#endif
memset (&header, 0, sizeof (st_lnx_header_t));
- strcpy (header.magic, MAGIC_STRING);
+ memcpy (header.magic, MAGIC_STRING, sizeof(header.magic));
strcpy (header.cartname, cartname);
strcpy (header.manufname, manufname);
header.page_size_bank0 = cart_analyse (BANK0);