Return the last byte from the serial FIFO buffer in case it is empty, not an unrelated one.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3547
This commit is contained in:
parent
e4666d2baf
commit
edd52b4b28
1 changed files with 2 additions and 1 deletions
|
@ -100,8 +100,9 @@ public:
|
|||
Bit8u getb() {
|
||||
if (!used) return data[pos];
|
||||
Bitu where=pos;
|
||||
if (++pos>=size) pos-=size;
|
||||
used--;
|
||||
if(used) pos++;
|
||||
if (pos>=size) pos-=size;
|
||||
return data[where];
|
||||
}
|
||||
Bit8u getTop() {
|
||||
|
|
Loading…
Add table
Reference in a new issue