diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/wolf/log/log.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/wolf/log/log.h b/include/wolf/log/log.h index b31243b..ae91de2 100644 --- a/include/wolf/log/log.h +++ b/include/wolf/log/log.h @@ -288,9 +288,9 @@ void wolf_log_reopenlogtoeventlog( void ); void wolf_log( wolf_log_level_t level, int category_id, int message_id, const char *format, ... ); #ifdef _WIN32 -#define WOLF_LOG_GET_LAST_ERROR( errbuf, errbuf_size ) \ + +#define WOLF_LOG_GET_LAST_ERROR( last_error, errbuf, errbuf_size ) \ { \ - DWORD wolf_log_last_error = GetLastError( ); \ LPVOID wolf_log_errbuf; \ DWORD wolf_log_buf_size; \ DWORD wolf_log_res; \ @@ -301,14 +301,14 @@ void wolf_log( wolf_log_level_t level, int category_id, int message_id, const ch FORMAT_MESSAGE_IGNORE_INSERTS | \ FORMAT_MESSAGE_MAX_WIDTH_MASK, \ NULL, /* message is from system */ \ - wolf_log_last_error, /* there is a message with that id */ \ + last_error, /* there is a message with that id */ \ 0, /* default language preference */ \ - (LPTSTR)&wolf_log_errbuf,/* buffer allocated internally with LocalAlloc */\ + (LPTSTR)&wolf_log_errbuf,/* buffer allocated internally with LocalAlloc */ \ 0, /* minimum allocation size */ \ NULL ); /* no arguments */ \ \ if( wolf_log_res == 0 ) { \ - strlcpy( wolf_log_errbuf, _( "No message available" ) \ + strlcpy( errbuf, _( "No message available" ), errbuf_size ); \ } \ \ strlcpy( errbuf, wolf_log_errbuf, errbuf_size ); \ |