Fixed initialization of va_list variable in debug() in common.cpp, and mismatched new/free() in io.cpp

This commit is contained in:
Siteshwar Vashisht 2012-02-23 23:10:51 +05:30
parent 376e199ebb
commit fd56465931
2 changed files with 5 additions and 3 deletions

View file

@ -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 );

2
io.cpp
View file

@ -152,7 +152,7 @@ void io_buffer_destroy( io_data_t *io_buffer )
b_destroy( io_buffer->param2.out_buffer );
free( io_buffer->param2.out_buffer );
free( io_buffer );
delete io_buffer;
}