diff options
author | rubidium <rubidium@openttd.org> | 2011-12-18 18:37:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-12-18 18:37:54 +0000 |
commit | fefe22b4aa5194af499763d3cc4d4dc19116fa92 (patch) | |
tree | 5b2671aa4bc5b68584d962d11a8ceab705ad6321 /src/network/core/packet.cpp | |
parent | 6ae8cac4320e098c1fa628a3afd5c090aacc80a2 (diff) | |
download | openttd-fefe22b4aa5194af499763d3cc4d4dc19116fa92.tar.xz |
(svn r23590) -Codechange: make the string validation settings better expandable
Diffstat (limited to 'src/network/core/packet.cpp')
-rw-r--r-- | src/network/core/packet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index d30ef9e5f..4d9345e82 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -283,9 +283,9 @@ uint64 Packet::Recv_uint64() * Reads a string till it finds a '\0' in the stream. * @param buffer The buffer to put the data into. * @param size The size of the buffer. - * @param allow_newlines Whether the string validation should remove newlines. + * @param settings The string validation settings. */ -void Packet::Recv_string(char *buffer, size_t size, bool allow_newlines) +void Packet::Recv_string(char *buffer, size_t size, StringValidationSettings settings) { PacketSize pos; char *bufp = buffer; @@ -306,7 +306,7 @@ void Packet::Recv_string(char *buffer, size_t size, bool allow_newlines) } this->pos = pos; - str_validate(bufp, last, allow_newlines); + str_validate(bufp, last, settings); } #endif /* ENABLE_NETWORK */ |