1
0
Fork 0

Do it for both read-only modi

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4184
This commit is contained in:
Peter Veenstra 2019-01-25 14:34:47 +00:00
parent 1fbaff47fc
commit 4e88b1eb2c

View file

@ -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;
}