kopia lustrzana https://github.com/felHR85/UsbSerial
Fix appendRawData()
Some of the indexes and sizes used for updating the buffer were not the proper onespull/279/head
rodzic
828809f874
commit
321cca8cbb
|
@ -132,10 +132,10 @@ public class ProtocolBuffer {
|
|||
|
||||
if(prevIndex < rawBuffer.length
|
||||
&& prevIndex > 0){
|
||||
byte[] tempBuffer = Arrays.copyOfRange(rawBuffer, prevIndex, rawBuffer.length);
|
||||
byte[] tempBuffer = Arrays.copyOfRange(rawBuffer, prevIndex, bufferPointer);
|
||||
bufferPointer = 0;
|
||||
System.arraycopy(tempBuffer, 0, rawBuffer, bufferPointer, rawData.length);
|
||||
bufferPointer += rawData.length;
|
||||
System.arraycopy(tempBuffer, 0, rawBuffer, bufferPointer, tempBuffer.length);
|
||||
bufferPointer += tempBuffer.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue