diff options
Diffstat (limited to '')
-rw-r--r-- | onkyo_ri.pde | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/onkyo_ri.pde b/onkyo_ri.pde index 3fa2808..9f8c607 100644 --- a/onkyo_ri.pde +++ b/onkyo_ri.pde @@ -70,8 +70,8 @@ bool inRange(int value, int expected) { int getPulseLengthInRange(int expected) { int length = getPulseLength(); - if (!inRange(length, expected)) { - length = 0; + if (length <= 0 || !inRange(length, expected)) { + return 0; } return length; |