From 1cd5b2f4e100cc18d70d3e37aca747a61ca42f3f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 7 Mar 2019 10:02:39 +0100 Subject: [PATCH] Pass string length instead of recomputing This called `writestr(char*)`, which then just called `writestr(char*, strlen(char*))`, when it had the string length right there! --- src/output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.cpp b/src/output.cpp index ce44afb77..581964101 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -410,7 +410,7 @@ void outputter_t::writestr(const wchar_t *str) { buffer = new char[len]; } wcstombs(buffer, str, len); - this->writestr(buffer); + this->writestr(buffer, len); if (buffer != static_buffer) delete[] buffer; }