mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
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!
This commit is contained in:
parent
2b0b3d3193
commit
1cd5b2f4e1
1 changed files with 1 additions and 1 deletions
|
@ -410,7 +410,7 @@ void outputter_t::writestr(const wchar_t *str) {
|
||||||
buffer = new char[len];
|
buffer = new char[len];
|
||||||
}
|
}
|
||||||
wcstombs(buffer, str, len);
|
wcstombs(buffer, str, len);
|
||||||
this->writestr(buffer);
|
this->writestr(buffer, len);
|
||||||
if (buffer != static_buffer) delete[] buffer;
|
if (buffer != static_buffer) delete[] buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue