Potential fix to MSDD warnings by setting sequence number from buffer more explicitly.
[debian/gnuradio] / gr-msdd6000 / src / msdd_rs_source_simple.cc
index c44808f5176c4c8d5eb0086a6734e30e9423dd6f..70e692d8321243913b63133413c34cb3b83784e0 100644 (file)
@@ -64,7 +64,10 @@ msdd_rs_source_simple::work (int noutput_items,
        /* Read a buffer out -- looking at UDP payload at this point.*/
        rcv->read( &buffer[0], BUF_LEN );
        
-       int seq = *((int*) &buffer[2]);
+       //int seq = *((int*) &buffer[2]);
+       int seq;
+       memcpy(&seq, &buffer[2], 4*sizeof(char));
+
        char type = buffer[0];
        //printf("Sequence %d\n",seq);