mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
repair peek
This commit is contained in:
parent
ddc0c5ac3c
commit
024c8fc199
|
@ -48,7 +48,8 @@ class RingStream : public Print {
|
||||||
void flush();
|
void flush();
|
||||||
void info();
|
void info();
|
||||||
byte readRawByte();
|
byte readRawByte();
|
||||||
inline byte peek() {
|
inline int peek() {
|
||||||
|
if ((_pos_read==_pos_write) && !_overflow) return -1; // empty
|
||||||
return _buffer[_pos_read];
|
return _buffer[_pos_read];
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user