summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 90ef02ef37b..6b4182cb319 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2002,7 +2002,10 @@ verror (const char *m, va_list ap)
while (1)
{
- used = doprnt (buffer, size, m, m + mlen, ap);
+ va_list ap_copy;
+ va_copy (ap_copy, ap);
+ used = doprnt (buffer, size, m, m + mlen, ap_copy);
+ va_end (ap_copy);
/* Note: the -1 below is because `doprnt' returns the number of bytes
excluding the terminating null byte, and it always terminates with a