From 86ce17722885fb53215f5ca0a748b9ba6f2f7d46 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sat, 27 Jan 2018 19:57:15 +0100 Subject: [PATCH] time_t may be signed in JSON --- libretroshare/src/serialiser/rstypeserializer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/serialiser/rstypeserializer.cc b/libretroshare/src/serialiser/rstypeserializer.cc index f4dc2d3c1..8d7ba5daf 100644 --- a/libretroshare/src/serialiser/rstypeserializer.cc +++ b/libretroshare/src/serialiser/rstypeserializer.cc @@ -251,8 +251,8 @@ bool RsTypeSerializer::from_JSON( const std::string& memberName, time_t& member, RsJson& jDoc ) { SAFE_GET_JSON_V(); - ret = ret && v.IsUint(); - if(ret) member = v.GetUint(); + ret = ret && v.IsInt(); + if(ret) member = v.GetInt(); return ret; } @@ -298,7 +298,7 @@ bool RsTypeSerializer::from_JSON( const std::string& memberName, //============================================================================// -// FLoats // +// Floats // //============================================================================// template<> uint32_t RsTypeSerializer::serial_size(const float&){ return 4; }