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:
parent
1fbaff47fc
commit
4e88b1eb2c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue