From c7b99751d9f583b237eb2f1c9df61194ff2932b7 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 25 Feb 2018 08:59:57 +0100 Subject: [PATCH] Fixed two bugs reported by waltje. --- src/scsi/scsi_x54x.c | 5 ++--- src/win/win_devconf.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/scsi/scsi_x54x.c b/src/scsi/scsi_x54x.c index b0333d45b..5232a0f1c 100644 --- a/src/scsi/scsi_x54x.c +++ b/src/scsi/scsi_x54x.c @@ -11,7 +11,7 @@ * series of SCSI Host Adapters made by Mylex. * These controllers were designed for various buses. * - * Version: @(#)scsi_x54x.c 1.0.15 2018/02/19 + * Version: @(#)scsi_x54x.c 1.0.16 2018/02/23 * * Authors: TheCollector1995, * Miran Grca, @@ -1386,12 +1386,11 @@ x54x_in(uint16_t port, void *priv) ret = dev->Geometry; else { switch(dev->Geometry) { - case 0: ret = 'A'; break; + case 0: default: ret = 'A'; break; case 1: ret = 'D'; break; case 2: ret = 'A'; break; case 3: ret = 'P'; break; } - ret ^= 1; dev->Geometry++; if (dev->Geometry == 4) dev->Geometry = 0; diff --git a/src/win/win_devconf.c b/src/win/win_devconf.c index 3224fcde1..4eec1f0e2 100644 --- a/src/win/win_devconf.c +++ b/src/win/win_devconf.c @@ -8,7 +8,7 @@ * * Windows device configuration dialog implementation. * - * Version: @(#)win_devconf.c 1.0.12 2018/02/18 + * Version: @(#)win_devconf.c 1.0.13 2018/02/23 * * Authors: Sarah Walker, * Miran Grca, @@ -83,7 +83,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) val_int = config_get_int((char *) config_device->name, (char *) config->name, config->default_int); c = 0; - while (selection->description[0]) + while (selection->description && selection->description[0]) { mbstowcs(lptsTemp, selection->description, strlen(selection->description) + 1); SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp);