Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when changing floppies mounted by drive numbers on a booted guest OS #5256

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Next
- Fixed crashes when changing floppies mounted by drive numbers on
a booted guest OS (maron2000)
- Fixed launching host programs with white spaces in path (Windows)
(maron2000)
- Convert paths from relative to absolute when launching host programs
in a mounted drive (Windows) (maron2000)
- Added an option not to pause after host program execution is
completed (maron2000)
- Fixed corrupted display when loading language files at launch
Expand Down
3 changes: 2 additions & 1 deletion src/dos/drive_fat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ extern bool CodePageGuestToHostUTF16(uint16_t *d/*CROSS_LEN*/,const char *s/*CRO
extern bool CodePageHostToGuestUTF16(char *d/*CROSS_LEN*/,const uint16_t *s/*CROSS_LEN*/);
extern bool wild_match(const char* haystack, char* needle);
bool systemmessagebox(char const * aTitle, char const * aMessage, char const * aDialogType, char const * aIconType, int aDefaultButton);
extern bool dos_kernel_disabled;

int PC98AutoChoose_FAT(const std::vector<_PC98RawPartition> &parts,imageDisk *loadedDisk) {
for (size_t i=0;i < parts.size();i++) {
Expand Down Expand Up @@ -1343,7 +1344,7 @@ fatDrive::fatDrive(const char* sysFilename, uint32_t bytesector, uint32_t cylsec
uint32_t filesize;
unsigned char bootcode[256];

if(imgDTASeg == 0) {
if(!dos_kernel_disabled && imgDTASeg == 0) {
imgDTASeg = DOS_GetMemory(4,"imgDTASeg");
imgDTAPtr = RealMake(imgDTASeg, 0);
imgDTA = new DOS_DTA(imgDTAPtr);
Expand Down
Loading