From 47ebb26aea3e89d904a788538dc0c3179e7c2010 Mon Sep 17 00:00:00 2001 From: cqm Date: Tue, 16 Oct 2018 16:27:42 +0800 Subject: [PATCH] merge #175: Support UInt64 values in string payloads --- src/internal/sio_packet.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/internal/sio_packet.cpp b/src/internal/sio_packet.cpp index f549aaac..48e356c0 100755 --- a/src/internal/sio_packet.cpp +++ b/src/internal/sio_packet.cpp @@ -140,6 +140,10 @@ namespace sio { return int_message::create(value.GetInt64()); } + else if (value.IsUint64()) + { + return int_message::create(static_cast(value.GetUint64())); + } else if(value.IsDouble()) { return double_message::create(value.GetDouble()); @@ -182,14 +186,14 @@ namespace sio } return ptr; } - else if(value.IsBool()) - { - return bool_message::create(value.GetBool()); - } - else if(value.IsNull()) - { - return null_message::create(); - } + else if(value.IsBool()) + { + return bool_message::create(value.GetBool()); + } + else if(value.IsNull()) + { + return null_message::create(); + } return message::ptr(); }