diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index c6d82d26..d2ba17d1 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -450,7 +450,8 @@ bool localFile::Read(Bit8u * data,Bit16u * size) { } bool localFile::Write(Bit8u * data,Bit16u * size) { - if ((this->flags & 0xf) == OPEN_READ) { // check if file opened in read-only mode + Bit32u lastflags = this->flags & 0xf; + if (lastflags == OPEN_READ || lastflags == OPEN_READ_NO_MOD) { // check if file opened in read-only mode DOS_SetError(DOSERR_ACCESS_DENIED); return false; }