fix problem with bufferUntil() not properly handling values over 127 (issue #1079)

This commit is contained in:
benfry
2012-08-04 19:57:29 +00:00
parent c5db8dbb16
commit 02b4e738f5
2 changed files with 7 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ public class Serial implements SerialPortEventListener {
//boolean bufferUntil = false;
int bufferSize = 1; // how big before reset or event firing
boolean bufferUntil;
int bufferUntilByte;
byte bufferUntilByte;
// defaults
@@ -306,7 +306,7 @@ public class Serial implements SerialPortEventListener {
*/
public void bufferUntil(int what) {
bufferUntil = true;
bufferUntilByte = what;
bufferUntilByte = (byte) what;
}