summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llsdutil.cpp')
-rw-r--r--indra/llcommon/llsdutil.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index 12f67208c1..fda47c7a87 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -32,8 +32,7 @@
#include <sstream>
#if LL_WINDOWS
-# define WIN32_LEAN_AND_MEAN
-# include <winsock2.h> // for htonl
+# include "llwin32headers.h" // for htonl
#elif LL_LINUX
# include <netinet/in.h>
#elif LL_DARWIN
@@ -161,7 +160,7 @@ LLSD ll_binary_from_string(const LLSD& sd)
char* ll_print_sd(const LLSD& sd)
{
const U32 bufferSize = 10 * 1024;
- static char buffer[bufferSize];
+ static char buffer[bufferSize + 1];
std::ostringstream stream;
//stream.rdbuf()->pubsetbuf(buffer, bufferSize);
stream << LLSDOStreamer<LLSDXMLFormatter>(sd);
@@ -183,7 +182,7 @@ char* ll_pretty_print_sd_ptr(const LLSD* sd)
char* ll_pretty_print_sd(const LLSD& sd)
{
const U32 bufferSize = 100 * 1024;
- static char buffer[bufferSize];
+ static char buffer[bufferSize + 1];
std::ostringstream stream;
//stream.rdbuf()->pubsetbuf(buffer, bufferSize);
stream << LLSDOStreamer<LLSDXMLFormatter>(sd, LLSDFormatter::OPTIONS_PRETTY);