Print warning also when serializing negative rstime_t

This commit is contained in:
Gioacchino Mazzurco 2018-10-16 16:19:23 +02:00
parent 03cdd6c7b6
commit 2bb24075c4
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -303,5 +303,9 @@ bool getRawTimeT(const void *data,uint32_t size,uint32_t *offset,rstime_t& t)
}
bool setRawTimeT(void *data, uint32_t size, uint32_t *offset, const rstime_t& t)
{
if(t < 0) // [[unlikely]]
std::cerr << __PRETTY_FUNCTION__ << " got a negative time: " << t
<< " this seems fishy, report to the developers!" << std::endl;
return setRawUInt64(data,size,offset,t) ;
}