Fixed an overrun in win/win_ui.c, a few newly introduced bugs, and a warning in the MPU-401 code.

This commit is contained in:
OBattler
2020-01-15 01:03:54 +01:00
parent 7d551af78b
commit 8928ef3f66
5 changed files with 9 additions and 6 deletions

View File

@@ -1341,10 +1341,14 @@ mem_write_scatb(uint32_t addr, uint8_t val, void *priv)
scat_t *dev;
uint32_t oldaddr = addr, chkaddr;
if (page == NULL)
dev = NULL;
else
dev = (scat_t *)page->scat;
if (dev == NULL)
chkaddr = oldaddr;
else {
dev = (scat_t *)page->scat;
addr = get_addr(dev, addr, page);
chkaddr = addr;
}

View File

@@ -58,7 +58,7 @@ GLOBAL int dopause, /* system is paused */
mouse_capture; /* mouse is captured in app */
GLOBAL uint64_t timer_freq;
GLOBAL int infocus;
GLOBAL char emu_version[128]; /* version ID string */
GLOBAL char emu_version[200]; /* version ID string */
GLOBAL int rctrl_is_lalt;
GLOBAL int update_icons;

View File

@@ -1337,7 +1337,7 @@ MPU401_InputMsg(void *p, uint8_t *msg)
uint8_t len = msg[3], key;
uint8_t recdata[2], recmsg[4];
int send = 1, send_thru = 0;
int retrigger_thru = 0, midistatus = 0, chan, chrefnum;
int retrigger_thru = 0, chan, chrefnum;
/* Abort if sysex transfer is in progress. */
if (!mpu->state.sysex_in_finished) {
@@ -1350,7 +1350,6 @@ MPU401_InputMsg(void *p, uint8_t *msg)
if (mpu->mode == M_INTELLIGENT) {
if (msg[0] < 0x80) {
/* Expand running status */
midistatus = 1;
msg[2] = msg[1];
msg[1] = msg[0];
msg[0] = old_msg;

View File

@@ -551,7 +551,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
switch (message) {
case WM_INITDIALOG:
plat_pause(1);
memset(fd_file_name, 0, 512 * sizeof(wchar_t));
memset(fd_file_name, 0, 1024 * sizeof(wchar_t));
h = GetDlgItem(hdlg, IDC_COMBO_DISK_SIZE);
if (is_zip) {
zip_types = zip_drives[fdd_id].is_250 ? 2 : 1;

View File

@@ -3463,7 +3463,7 @@ win_settings_floppy_drives_recalc_list(HWND hwndList)
{
LVITEM lvI;
int i = 0;
char s[256], t;
char s[256], *t;
WCHAR szText[256];
lvI.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;