From 3209e8b9df26bd36f495e42959371f469dff9a6c Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 27 Dec 2013 12:17:19 -0800 Subject: Reducing stack usage on append. --- src/BString.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BString.cc b/src/BString.cc index d14280c..4ba3601 100644 --- a/src/BString.cc +++ b/src/BString.cc @@ -8,9 +8,9 @@ Balau::String & Balau::String::set(const char * fmt, va_list ap) { unsigned int l; #ifdef _WIN32 // Microsoft is stupid. - char tt[65536]; + char tt[4096]; l = _vsnprintf(tt, sizeof(tt) - 1, fmt, ap); - tt[65535] = 0; + tt[4095] = 0; assign(tt, l); #else char * t; @@ -26,9 +26,9 @@ Balau::String & Balau::String::append(const char * fmt, va_list ap) { unsigned int l; #ifdef _WIN32 // Microsoft is stupid. - char tt[65536]; + char tt[4096]; l = _vsnprintf(tt, sizeof(tt)-1, fmt, ap); - tt[65535] = 0; + tt[4095] = 0; std::string::append(tt, l); #else char * t; -- cgit v1.2.3