From 0b1000ec19561dfe04aa5d0480d51b076e3e48c6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 10 Aug 2021 16:19:37 +0200 Subject: [PATCH] A small config.c fix and the Acrosser AR-B1479 now uses the Winbond W29C020 Flash chip. --- src/config.c | 4 ++-- src/machine/m_at_386dx_486.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index 1b1ef97cf..7cc626ee9 100644 --- a/src/config.c +++ b/src/config.c @@ -1112,12 +1112,12 @@ load_storage_controllers(void) if (strlen(p) > 511) fatal("load_storage_controllers(): strlen(p) > 511\n"); else - strncpy(cassette_fname, p, strlen(p) + 1); + strncpy(cassette_fname, p, MIN(511, strlen(p) + 1)); p = config_get_string(cat, "cassette_mode", ""); if (strlen(p) > 511) fatal("load_storage_controllers(): strlen(p) > 511\n"); else - strncpy(cassette_mode, p, strlen(p) + 1); + strncpy(cassette_mode, p, MIN(511, strlen(p) + 1)); cassette_pos = config_get_int(cat, "cassette_position", 0); cassette_srate = config_get_int(cat, "cassette_srate", 44100); cassette_append = !!config_get_int(cat, "cassette_append", 0); diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index d7b880fdb..03ba605f3 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -1310,7 +1310,7 @@ machine_at_arb1479_init(const machine_t *model) device_add(&w83977f_device); device_add(&keyboard_ps2_ami_pci_device); device_add(&stpc_consumer2_device); - device_add(&sst_flash_39sf020_device); + device_add(&winbond_flash_w29c020_device); return ret; }