File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 99#include < rapidjson/encodedstream.h>
1010#include < rapidjson/writer.h>
1111#include < cassert>
12+ #include < boost/lexical_cast.hpp>
1213
1314#define kBIN_PLACE_HOLDER " _placeholder"
1415
@@ -259,7 +260,7 @@ namespace sio
259260 pos++;
260261 if (_type == type_binary_event || _type == type_binary_ack) {
261262 size_t score_pos = payload_ptr.find (' -' );
262- _pending_buffers = stoi (payload_ptr.substr (pos,score_pos));
263+ _pending_buffers = boost::lexical_cast< unsigned > (payload_ptr.substr (pos,score_pos));
263264 pos = score_pos+1 ;
264265 }
265266 }
@@ -299,7 +300,7 @@ namespace sio
299300
300301 if (pos<json_pos)// we've got pack id.
301302 {
302- _pack_id = stoi (payload_ptr.substr (pos,json_pos - pos));
303+ _pack_id = boost::lexical_cast< int > (payload_ptr.substr (pos,json_pos - pos));
303304 }
304305 if (_frame == frame_message && (_type == type_binary_event || _type == type_binary_ack)) {
305306 // parse later when all buffers are arrived.
You can’t perform that action at this time.
0 commit comments