| 1 |
/* $Id$ */ |
| 2 |
--- src/send.c Wed Aug 3 22:37:59 2005 |
| 3 |
+++ src/send.c Mon Aug 15 00:57:15 2005 |
| 4 |
@@ -65,6 +65,7 @@ |
| 5 |
send_format(char *lsendbuf, int bufsize, const char *pattern, va_list args) |
| 6 |
{ |
| 7 |
int len; |
| 8 |
+ va_list args_copy; |
| 9 |
|
| 10 |
/* |
| 11 |
* from rfc1459 |
| 12 |
@@ -78,7 +79,10 @@ |
| 13 |
* continuation message lines. See section 7 for more details about |
| 14 |
* current implementations. |
| 15 |
*/ |
| 16 |
- len = vsnprintf(lsendbuf, bufsize - 1, pattern, args); |
| 17 |
+ |
| 18 |
+ va_copy(args_copy, args); |
| 19 |
+ len = vsnprintf(lsendbuf, bufsize - 1, pattern, args_copy); |
| 20 |
+ va_end(args_copy); |
| 21 |
if (len > bufsize - 2) |
| 22 |
len = bufsize - 2; /* required by some versions of vsnprintf */ |