Correct update of d_temp_offset (parallel construction)
[debian/gnuradio] / gnuradio-core / src / lib / io / gr_udp_source.cc
index 063cd7b507fa550930295d9302b07eb3f7311f3f..cc98492805914e34a5d2e263731b19c5772b0389 100755 (executable)
@@ -242,7 +242,8 @@ gr_udp_source::work (int noutput_items,
     
     // Update indexing of amount of bytes left in the buffer
     d_residual -= nbytes;
-    d_temp_offset = d_temp_offset+d_residual;
+    d_temp_offset += nbytes;
+    // FIXME? Returning here could simplify life...
   }
 
 #if USE_SELECT