Fixed two more bugs reported by waltje.

This commit is contained in:
OBattler
2018-02-25 09:18:32 +01:00
parent 685eaa8a07
commit b92a259e4d
2 changed files with 5 additions and 6 deletions

View File

@@ -9,7 +9,7 @@
* Implementation of the CD-ROM drive with SCSI(-like)
* commands, for both ATAPI and SCSI usage.
*
* Version: @(#)cdrom.c 1.0.31 2018/02/15
* Version: @(#)cdrom.c 1.0.32 2018/02/25
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
@@ -1923,14 +1923,13 @@ cdrom_readtoc_fallback:
b[6] = (MMC_PROFILE_DVD_ROM >> 8) & 0xff;
b[7] = MMC_PROFILE_DVD_ROM & 0xff;
ret = 1;
} else if (len <= CD_MAX_SECTORS) {
} else {
b[6] = (MMC_PROFILE_CD_ROM >> 8) & 0xff;
b[7] = MMC_PROFILE_CD_ROM & 0xff;
ret = 0;
}
} else {
} else
ret = 2;
}
alloc_length = 8;
b += 8;

View File

@@ -8,7 +8,7 @@
*
* Windows device configuration dialog implementation.
*
* Version: @(#)win_devconf.c 1.0.13 2018/02/23
* Version: @(#)win_devconf.c 1.0.14 2018/02/25
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -421,7 +421,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
}
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, ";");