Fixed more bugs.

This commit is contained in:
OBattler
2018-02-25 10:40:53 +01:00
parent b92a259e4d
commit 0130c82df3
2 changed files with 8 additions and 8 deletions

View File

@@ -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.16 2018/02/23
* Version: @(#)scsi_x54x.c 1.0.17 2018/02/25
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -1391,9 +1391,9 @@ x54x_in(uint16_t port, void *priv)
case 2: ret = 'A'; break;
case 3: ret = 'P'; break;
}
ret ^= 1;
dev->Geometry++;
if (dev->Geometry == 4)
dev->Geometry = 0;
dev->Geometry &= 0x03;
break;
}
break;

View File

@@ -8,7 +8,7 @@
*
* Windows device configuration dialog implementation.
*
* Version: @(#)win_devconf.c 1.0.14 2018/02/25
* Version: @(#)win_devconf.c 1.0.15 2018/02/25
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -134,7 +134,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
val_int = config_get_hex16((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);
@@ -151,7 +151,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
val_int = config_get_hex20((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);
@@ -404,14 +404,14 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
file_filter[0] = 0;
c = 0;
while (config->file_filter[c].description[0])
while (config->file_filter[c].description && config->file_filter[c].description[0])
{
if (c > 0)
strcat(file_filter, "|");
strcat(file_filter, config->file_filter[c].description);
strcat(file_filter, " (");
d = 0;
while (config->file_filter[c].extensions[d][0])
while (config->file_filter[c].extensions[d] && config->file_filter[c].extensions[d][0])
{
if (d > 0)
strcat(file_filter, ";");