diff options
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common.c b/src/common.c index 0bd63be..f7ad7e6 100644 --- a/src/common.c +++ b/src/common.c @@ -51,13 +51,15 @@ void info(const char* format, ...) void error(const char* format, ...) { - va_list vargs; + va_list vargs, vargs2; va_start(vargs, format); + va_copy(vargs2, vargs); vsnprintf(idevicerestore_err_buff, idevicerestore_err_buff_size, format, vargs); + va_end(vargs); if (!error_disabled) { - vfprintf((error_stream) ? error_stream : stderr, format, vargs); + vfprintf((error_stream) ? error_stream : stderr, format, vargs2); } - va_end(vargs); + va_end(vargs2); } void debug(const char* format, ...) |