1
0
Fork 0

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:
Peter Veenstra 2014-12-12 19:02:37 +00:00
parent 144aa917e3
commit b2a6860032

View file

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