mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-16 14:54:59 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
8a17224133
@ -44,6 +44,7 @@
|
|||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <pmt/pmt.h>
|
#include <pmt/pmt.h>
|
||||||
|
#include <algorithm> // for min
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -593,7 +594,7 @@ private:
|
|||||||
inline void encode_header()
|
inline void encode_header()
|
||||||
{
|
{
|
||||||
char header[header_length + 1] = "";
|
char header[header_length + 1] = "";
|
||||||
std::snprintf(header, header_length, "GS%4d", static_cast<int>(body_length_));
|
std::snprintf(header, header_length + 1, "GS%4d", std::min(static_cast<int>(body_length_), static_cast<int>(max_body_length)));
|
||||||
std::memcpy(data_, header, header_length);
|
std::memcpy(data_, header, header_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user