diff options
| author | Wladimir J. van der Laan <[email protected]> | 2011-06-13 16:56:37 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2011-06-13 16:56:37 +0200 |
| commit | 39cf857db9b926c47f545cba1d7113267260c40e (patch) | |
| tree | 8aa3a7fbfa8079e7837650c8c3f0e9032ba87df4 /src/rpc.cpp | |
| parent | Address book: select action (edit/select) based on context (diff) | |
| download | discoin-39cf857db9b926c47f545cba1d7113267260c40e.tar.xz discoin-39cf857db9b926c47f545cba1d7113267260c40e.zip | |
Internationalization -- initial step, make _ return a std::string to prevent memory leaks
Diffstat (limited to 'src/rpc.cpp')
| -rw-r--r-- | src/rpc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp index 530bef4a4..ca88bec91 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -40,13 +40,13 @@ Object JSONRPCError(int code, const string& message) } -void PrintConsole(const char* format, ...) +void PrintConsole(const std::string &format, ...) { char buffer[50000]; int limit = sizeof(buffer); va_list arg_ptr; va_start(arg_ptr, format); - int ret = _vsnprintf(buffer, limit, format, arg_ptr); + int ret = _vsnprintf(buffer, limit, format.c_str(), arg_ptr); va_end(arg_ptr); if (ret < 0 || ret >= limit) { |