diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 6f27b9ca6..e60dbf40a 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -471,7 +471,7 @@ void *rtksvrthread(void *arg) q = svr->buff[i] + svr->buffsize; /* read receiver raw/rtcm data from input stream */ - if ((n = strread(svr->stream + i, p, q - p)) <= 0) + if ((n = strread(svr->stream + i, p, static_cast(q[0]) - static_cast(p[0]))) <= 0) { continue; }