mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-14 06:45:09 +01:00
[Core/CD] fixed CHD data initialization (fixes potential crashes when loading non-CHD CD image files after 10MB ROM file)
This commit is contained in:
parent
ae28f87402
commit
724015c5a5
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
@ -2,7 +2,7 @@
|
||||
* Genesis Plus
|
||||
* CD drive processor & CD-DA fader
|
||||
*
|
||||
* Copyright (C) 2012-2017 Eke-Eke (Genesis Plus GX)
|
||||
* Copyright (C) 2012-2018 Eke-Eke (Genesis Plus GX)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
@ -1169,7 +1169,6 @@ void cdd_unload(void)
|
||||
chd_close(cdd.chd.file);
|
||||
if (cdd.chd.hunk)
|
||||
free(cdd.chd.hunk);
|
||||
memset(&cdd.chd, 0x00, sizeof(cdd.chd));
|
||||
#endif
|
||||
|
||||
/* close CD tracks */
|
||||
@ -1209,7 +1208,12 @@ void cdd_unload(void)
|
||||
|
||||
/* reset TOC */
|
||||
memset(&cdd.toc, 0x00, sizeof(cdd.toc));
|
||||
|
||||
|
||||
#if defined(USE_LIBCHDR)
|
||||
/* reset CHD data */
|
||||
memset(&cdd.chd, 0x00, sizeof(cdd.chd));
|
||||
#endif
|
||||
|
||||
/* no CD-ROM track */
|
||||
cdd.sectorSize = 0;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Genesis Plus
|
||||
* CD drive processor & CD-DA fader
|
||||
*
|
||||
* Copyright (C) 2012-2017 Eke-Eke (Genesis Plus GX)
|
||||
* Copyright (C) 2012-2018 Eke-Eke (Genesis Plus GX)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
|
Loading…
Reference in New Issue
Block a user