Invert check for the case that there is no data left in the buffer
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Aug 2010 19:25:00 +0000 (19:25 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Aug 2010 19:25:00 +0000 (19:25 +0000)
TRD/AliTRDrawFastStream.cxx

index 16222fe..9ef2e2f 100644 (file)
@@ -1728,11 +1728,11 @@ Bool_t AliTRDrawFastStream::SeekEndOfData()
   Int_t fEndOfDataCount = 0;\r
   fNWordsCounter = 0;\r
 \r
-  while ( *fpPos != ENDOFRAWDATAMARKER && fpPos < fpEnd ) {\r
+  while ( fpPos < fpEnd && *fpPos != ENDOFRAWDATAMARKER ) {\r
     fpPos++;\r
     fNWordsCounter++;\r
   }\r
-  while (*fpPos == ENDOFRAWDATAMARKER && fpPos < fpEnd ) {\r
+  while ( fpPos < fpEnd && *fpPos == ENDOFRAWDATAMARKER ) {\r
     fEndOfDataCount++;\r
     fpPos++;\r
   }\r