Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Ilyas2018-05-02 20:19:26 +0000
committerJonah Graham2018-05-02 20:54:05 +0000
commitb768556355ad13369c9d18db83fcc43b50fc8385 (patch)
tree0a45927033ea33fcb3a37f1d67da0775167b9ccc /native/org.eclipse.cdt.native.serial
parente17354be5cbee0df09691dcff23dea4f81caed73 (diff)
downloadorg.eclipse.cdt-b768556355ad13369c9d18db83fcc43b50fc8385.tar.gz
org.eclipse.cdt-b768556355ad13369c9d18db83fcc43b50fc8385.tar.xz
org.eclipse.cdt-b768556355ad13369c9d18db83fcc43b50fc8385.zip
Bug 482950. Reset the read pointer when array is filled with new data
Change-Id: I4bc9d2969d4ef69657d8a825659cafbc3680119c Signed-off-by: Waqas Ilyas <waqas.ilyas@gmail.com>
Diffstat (limited to 'native/org.eclipse.cdt.native.serial')
-rw-r--r--native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java
index 62bea0f1ad7..abbeacb5f9b 100644
--- a/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java
+++ b/native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java
@@ -79,6 +79,8 @@ public class SerialPort {
return -1;
}
} else if (rlen > 0) {
+ // Reset the pointer, as we have new data
+ rpos = 0;
break;
}
}

Back to the top