diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-03-03 15:28:16 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-03-03 15:28:16 -0800 |
commit | 00764406d78eb223b41536ad011b0f31735d532c (patch) | |
tree | 93ddb8a6395b29208b73db2c60214a25745cf86d /common.cpp | |
parent | 3ead99b0883c49d465a90a6746409003d7224190 (diff) |
Fix to preserve errno across certain calls to stop printing EOVERFLOW messages in weird places
Diffstat (limited to 'common.cpp')
-rw-r--r-- | common.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -460,10 +460,13 @@ wcstring vformat_string(const wchar_t *format, va_list va_orig) void append_format(wcstring &str, const wchar_t *format, ...) { + /* Preserve errno across this call since it likes to stomp on it */ + int err = errno; va_list va; va_start( va, format ); str.append(vformat_string(format, va)); va_end( va ); + errno = err; } wchar_t *wcsvarname( const wchar_t *str ) |