diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-23 23:10:51 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-02-23 23:10:51 +0530 |
commit | fd56465931698f8d2edf3b0964b775e20c25358d (patch) | |
tree | 0e4591983dd6404927e8f9f4741bfff7fadd96f8 /common.cpp | |
parent | 376e199ebb562672f415e548c9d127b24117f905 (diff) |
Fixed initialization of va_list variable in debug() in common.cpp, and mismatched new/free() in io.cpp
Diffstat (limited to 'common.cpp')
-rw-r--r-- | common.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -668,8 +668,10 @@ void debug( int level, const wchar_t *msg, ... ) CHECK( msg, ); - sb = format_string(L"%ls: ", program_name); - sb.append(vformat_string(msg, va)); + sb = format_string(L"%ls: ", program_name); + va_start(va, msg); + sb.append(vformat_string(msg, va)); + va_end(va); wcstring sb2; write_screen( sb, sb2 ); |