File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
src/dds.net-connector-csharp.lib/EncodersAndDecoders Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -49,21 +49,14 @@ internal void AddData(PacketFromServer packet)
4949 //-
5050 //- Compacting the buffer
5151 //-
52- if ( bufferNextWriteIndex != bufferStartIndex )
52+ if ( bufferStartIndex > 0 )
5353 {
54- int timesShifted = 0 ;
5554 for ( int i = 0 ; i < ( bufferNextWriteIndex - bufferStartIndex ) ; i ++ )
5655 {
5756 buffer [ i ] = buffer [ bufferStartIndex + i ] ;
58- timesShifted ++ ;
5957 }
6058
61- bufferStartIndex = 0 ;
62- bufferNextWriteIndex -= timesShifted ;
63- }
64- else
65- {
66- bufferNextWriteIndex = 0 ;
59+ bufferNextWriteIndex -= bufferStartIndex ;
6760 bufferStartIndex = 0 ;
6861 }
6962
@@ -163,8 +156,6 @@ internal byte[] GetSingleMessage()
163156 index ++ ;
164157 }
165158
166- previousDataStartIndex = bufferStartIndex ;
167-
168159 return null ! ;
169160 }
170161 //-
You can’t perform that action at this time.
0 commit comments