Reading from NUL changed to report 0 bytes read. Prevents infinite read loops on NUL.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3875
This commit is contained in:
parent
144aa917e3
commit
b2a6860032
1 changed files with 1 additions and 2 deletions
|
@ -37,8 +37,7 @@ class device_NUL : public DOS_Device {
|
|||
public:
|
||||
device_NUL() { SetName("NUL"); };
|
||||
virtual bool Read(Bit8u * data,Bit16u * size) {
|
||||
for(Bitu i = 0; i < *size;i++)
|
||||
data[i]=0;
|
||||
*size = 0; //Return success and no data read.
|
||||
LOG(LOG_IOCTL,LOG_NORMAL)("%s:READ",GetName());
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue