mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 14:20:44 -04:00
Print warning also when serializing negative rstime_t
This commit is contained in:
parent
03cdd6c7b6
commit
2bb24075c4
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
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) ;
|
return setRawUInt64(data,size,offset,t) ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue