summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-27 12:17:19 -0800
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-27 12:17:19 -0800
commit3209e8b9df26bd36f495e42959371f469dff9a6c (patch)
tree5352b7d0cdb955c866e34d33960d941fa1c13cef
parent1059e14a4316e47d739fd66e5f148fcd83381f36 (diff)
Reducing stack usage on append.
-rw-r--r--src/BString.cc8
1 files 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;