X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fcart.c;h=6a835b6399adb46e8d2c534af9197f3b5ccce152;hb=a76fad41291b7be0b42554353d6775dcdff065e0;hp=db742a8b684f2c175912a209a6610d6ae80f9c4d;hpb=005651ce13dc199390e9ffe2f0624e18cbde77dc;p=picodrive.git diff --git a/pico/cart.c b/pico/cart.c index db742a8..6a835b6 100644 --- a/pico/cart.c +++ b/pico/cart.c @@ -643,6 +643,8 @@ static int rom_strcmp(int rom_offset, const char *s1) { int i, len = strlen(s1); const char *s_rom = (const char *)Pico.rom; + if (rom_offset + len > Pico.romsize) + return 0; for (i = 0; i < len; i++) if (s1[i] != s_rom[(i + rom_offset) ^ 1]) return 1; @@ -897,10 +899,13 @@ static void parse_carthw(const char *carthw_cfg, int *fill_sram) SRam.flags &= ~SRF_EEPROM; else if (strcmp(p, "filled_sram") == 0) *fill_sram = 1; + else if (strcmp(p, "force_6btn") == 0) + PicoQuirks |= PQUIRK_FORCE_6BTN; else { elprintf(EL_STATUS, "carthw:%d: unsupported prop: %s", line, p); goto bad_nomsg; } + elprintf(EL_STATUS, "game prop: %s", p); continue; } else if (is_expr("eeprom_type", &p)) {