From 07e135547e1919048756a751adb71921b5beba94 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 18 Jan 2009 13:12:57 +0000 Subject: (svn r15135) -Fix/Change: allow str_validate (part of receiving strings from the network) to pass newlines instead of replacing them with question marks, but only when asked to do so. --- src/network/core/packet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/core/packet.cpp') diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 21d8cf5df..5c06ab488 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -233,7 +233,7 @@ uint64 Packet::Recv_uint64() } /** Reads a string till it finds a '\0' in the stream */ -void Packet::Recv_string(char *buffer, size_t size) +void Packet::Recv_string(char *buffer, size_t size, bool allow_newlines) { PacketSize pos; char *bufp = buffer; @@ -253,7 +253,7 @@ void Packet::Recv_string(char *buffer, size_t size) } this->pos = pos; - str_validate(bufp); + str_validate(bufp, allow_newlines); } #endif /* ENABLE_NETWORK */ -- cgit v1.2.3-54-g00ecf