diff --git a/src/core/config.h b/src/core/config.h index b567b0699..c919ccd10 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -64,7 +64,7 @@ inline std::string u16to8(const std::wstring& u16) { static inline size_t u8cols(const std::string& str) { std::wstring wstr = u8to16(str); - return (size_t) std::max(0, wcswidth(wstr.c_str(), str.size())); + return (size_t) std::max(0, wcswidth(wstr.c_str(), wstr.size())); } inline static size_t u8len(const std::string& str) {