summaryrefslogtreecommitdiff
path: root/generic/String.cpp
diff options
context:
space:
mode:
authorPixel <Pixel>2002-08-18 01:38:23 +0000
committerPixel <Pixel>2002-08-18 01:38:23 +0000
commit396239cc78a75ba7be739788485319c92b07d827 (patch)
treecd3e9ef485c1026e40b909c1989ef662cde30f5f /generic/String.cpp
parent11bf45f50739afb923829b3cc32efb9c8c009613 (diff)
Blehaurg
Diffstat (limited to 'generic/String.cpp')
-rw-r--r--generic/String.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/generic/String.cpp b/generic/String.cpp
index 0f4da24..c389c13 100644
--- a/generic/String.cpp
+++ b/generic/String.cpp
@@ -23,17 +23,13 @@ String::String(char c) : siz(1) {
str = t;
}
-String::String(const char * s, ...) : str(s ? Base::strdup(s) : Base::strdup("")) {
+String::String(const char * s, ...) {
va_list ap;
- if (!s)
- return;
-
/* This causes a warning: cannot pass objects of type `const String' through `...'
but it is not really a problem. */
va_start(ap, s);
vsnprintf(t, BUFSIZ, s, ap);
- free(str);
str = Base::strdup(t);
va_end(ap);
siz = ::strlen(str);