Bux fixes
Fixed typo causing fr::Packet string extraction to fail. Fixed Windows compilation error.
This commit is contained in:
parent
f8aa22d223
commit
6b2947932a
@ -15,7 +15,7 @@
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#DEFINE SOL_TCP SOL_SOCKET
|
||||
#define SOL_TCP SOL_SOCKET
|
||||
#else
|
||||
#define closesocket(x) close(x)
|
||||
#define INVALID_SOCKET 0
|
||||
|
||||
@ -330,11 +330,11 @@ namespace fr
|
||||
*/
|
||||
inline Packet&operator>>(std::string &var)
|
||||
{
|
||||
uint32_t length = (uint32_t)var.length();
|
||||
uint32_t length;
|
||||
*this >> length;
|
||||
|
||||
var = buffer.substr(buffer_offset, length);
|
||||
buffer_offset += sizeof(length);
|
||||
buffer_offset += length;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user