aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-03-18 23:14:03 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2012-04-03 20:22:41 +0200
commit52d3a48128b66e731afd54cec7cab0a687d303cf (patch)
treeade3bfd91c7e92ed83ea79219ed773fbc009ee0e /src/util.cpp
parent703d64469eb2b607adcd864555b5fe1d981bf51f (diff)
VC2010 compile fixes
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 08752e6930..cf73ecf5a5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -265,7 +265,7 @@ int my_snprintf(char* buffer, size_t limit, const char* format, ...)
return ret;
}
-string strprintf(const std::string &format, ...)
+string real_strprintf(const std::string &format, int dummy, ...)
{
char buffer[50000];
char* p = buffer;
@@ -274,7 +274,7 @@ string strprintf(const std::string &format, ...)
loop
{
va_list arg_ptr;
- va_start(arg_ptr, format);
+ va_start(arg_ptr, dummy);
ret = _vsnprintf(p, limit, format.c_str(), arg_ptr);
va_end(arg_ptr);
if (ret >= 0 && ret < limit)
@@ -292,13 +292,13 @@ string strprintf(const std::string &format, ...)
return str;
}
-bool error(const std::string &format, ...)
+bool error(const char *format, ...)
{
char buffer[50000];
int limit = sizeof(buffer);
va_list arg_ptr;
va_start(arg_ptr, format);
- int ret = _vsnprintf(buffer, limit, format.c_str(), arg_ptr);
+ int ret = _vsnprintf(buffer, limit, format, arg_ptr);
va_end(arg_ptr);
if (ret < 0 || ret >= limit)
{