diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/String.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/String.cc b/lib/String.cc index c3e8c07..4d7b0ff 100644 --- a/lib/String.cc +++ b/lib/String.cc @@ -133,7 +133,11 @@ const char * String::set(const char * s, ...) { /* This causes a warning: cannot pass objects of type `const String' through `...' but it is not really a problem. */ va_start(ap, s); +#ifdef HAVE_VSNPRINTF vsnprintf(t, BUFSIZ, s, ap); +#else + vsprintf(t, s, ap); +#endif free(str); str = Base::strdup(t); va_end(ap); @@ -145,7 +149,11 @@ const char * String::set(const String & s, ...) { va_list ap; va_start(ap, s); +#ifdef HAVE_VSNPRINTF vsnprintf(t, BUFSIZ, s.str, ap); +#else + vsprintf(t, s.str, ap); +#endif free(str); str = Base::strdup(t); va_end(ap); |