diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2015-09-12 16:52:16 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-09-21 16:41:26 -0700 |
commit | bfe142fef090a8cdc758d0878c76745f9ec74155 (patch) | |
tree | 7acfb5d588b0e9023eedb519f65f3659c378b645 /src | |
parent | 54e626f66518f7c3de26abbc589a75637ffac559 (diff) |
Use append_formatv in string_error
Diffstat (limited to 'src')
-rw-r--r-- | src/builtin_string.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/builtin_string.cpp b/src/builtin_string.cpp index 66417025..8df5eecd 100644 --- a/src/builtin_string.cpp +++ b/src/builtin_string.cpp @@ -40,11 +40,9 @@ static void string_error(const wchar_t *fmt, ...) { va_list va; va_start(va, fmt); - wcstring errstr = vformat_string(fmt, va); + stderr_buffer.append(L"string "); + append_formatv(stderr_buffer, fmt, va); va_end(va); - - stderr_buffer += L"string "; - stderr_buffer += errstr; } static void string_unknown_option(parser_t &parser, const wchar_t *subcmd, const wchar_t *opt) |