Skip to content

Commit 332da71

Browse files
committed
fix chainStream returning -1
#51
1 parent 6313c0d commit 332da71

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.pioenvs
22
.clang_complete
3-
.gcc-flags.json
3+
.gcc-flags.json
4+
.piolibdeps

src/chainStream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/***********
22
Sept. 2014 Rui Azevedo - ruihfazevedo(@rrob@)gmail.com
33
creative commons license 3.0: Attribution-ShareAlike CC BY-SA
4-
This software is furnished "as is", without technical support, and with no
4+
This software is furnished "as is", without technical support, and with no
55
warranty, express or implied, as to its usefulness for any purpose.
66
77
Thread Safe: No
@@ -34,7 +34,7 @@ class chainStream:public Stream {
3434
for(int n=0;n<N;n++) {
3535
int key=streams[n]->available()?streams[n]->read():-1;
3636
if (key!=on) {
37-
on=key;
37+
on=-1;
3838
return key;
3939
}
4040
//streams[n]->read();

0 commit comments

Comments
 (0)