ossp-pkg/str/str_basic.c 1.13 -> 1.14
--- str_basic.c 2005/01/24 15:22:19 1.13
+++ str_basic.c 2005/01/24 15:30:04 1.14
@@ -133,11 +133,11 @@
return NULL;
/* determine required target string length */
- ap_safe = ap;
+ va_copy(ap_safe, ap);
n = str_len(s);
while ((cp = va_arg(ap, char *)) != NULL)
n += str_len(cp);
- ap = ap_safe;
+ va_copy(ap, ap_safe);
/* allocate target string */
if ((rv = str_mem_alloc(n+1)) == NULL)
|
|