summaryrefslogtreecommitdiffstats
path: root/src/CommandOutput.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-15 18:28:51 +0100
committermadmaxoft <github@xoft.cz>2014-01-15 18:28:51 +0100
commitdd6c5779ec5e86ba8755efc77f632a6ffedb6414 (patch)
tree6b93d74bf952b1f22fe777c7dd5bfbdec568c6f1 /src/CommandOutput.cpp
parentFixed varargs modification. (diff)
downloadcuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.tar
cuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.tar.gz
cuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.tar.bz2
cuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.tar.lz
cuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.tar.xz
cuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.tar.zst
cuberite-dd6c5779ec5e86ba8755efc77f632a6ffedb6414.zip
Diffstat (limited to 'src/CommandOutput.cpp')
-rw-r--r--src/CommandOutput.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CommandOutput.cpp b/src/CommandOutput.cpp
index c221682a1..48a695969 100644
--- a/src/CommandOutput.cpp
+++ b/src/CommandOutput.cpp
@@ -16,9 +16,11 @@
void cCommandOutputCallback::Out(const char * a_Fmt, ...)
{
AString Output;
- va_list args;
+ va_list args, argsCopy;
va_start(args, a_Fmt);
- AppendVPrintf(Output, a_Fmt, args);
+ va_start(argsCopy, a_Fmt);
+ AppendVPrintf(Output, a_Fmt, args, argsCopy);
+ va_end(argsCopy);
va_end(args);
Output.append("\n");
Out(Output);