aboutsummaryrefslogtreecommitdiffstats
path: root/src/kvilib/core/KviQString.cpp
diff options
context:
space:
mode:
authorGravatar Alexey Sokolov2015-08-15 11:16:14 +0100
committerGravatar Alexey Sokolov2015-08-15 11:56:48 +0100
commitb3a3533931e2355d34c5a76e86eb2506dd66b64a (patch)
treecf5aab80fb19133b17939ceb3ce127ebc2e8ddff /src/kvilib/core/KviQString.cpp
parentMerge pull request #1507 from SolarAquarion/patch-1 (diff)
downloadKVIrc-b3a3533931e2355d34c5a76e86eb2506dd66b64a.tar.gz
KVIrc-b3a3533931e2355d34c5a76e86eb2506dd66b64a.tar.bz2
KVIrc-b3a3533931e2355d34c5a76e86eb2506dd66b64a.zip
Get rid of kvi_va_start_by_reference.
If to use va_start with references, behavior is undefined. So, KVIrc used asm magic instead, which relied on how compiler generates code. As a result, KVIrc has been crashing on Windows when compiled for x86 using msvc2013. Instead, pass the last parameter by value, and use standard va_start.
Diffstat (limited to 'src/kvilib/core/KviQString.cpp')
-rw-r--r--src/kvilib/core/KviQString.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kvilib/core/KviQString.cpp b/src/kvilib/core/KviQString.cpp
index e30f3bb3b..9ca940529 100644
--- a/src/kvilib/core/KviQString.cpp
+++ b/src/kvilib/core/KviQString.cpp
@@ -913,11 +913,11 @@ namespace KviQString
//szSrc.squeeze();
}
- void appendFormatted(QString & szSrc, const QString & szFmt, ...)
+ void appendFormatted(QString & szSrc, QString szFmt, ...)
{
QString szTmp;
kvi_va_list list;
- kvi_va_start_by_reference(list,szFmt);
+ kvi_va_start(list,szFmt);
//print...with max 256 chars
KviQString::vsprintf(szTmp,szFmt,list);
kvi_va_end(list);