From d15c83a1697d3798ed19261d2be617099d33a4ad Mon Sep 17 00:00:00 2001 From: saturneric Date: Sat, 1 Apr 2023 03:14:23 +0800 Subject: fix: solve codacy issues --- src/core/function/CharsetOperator.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/function/CharsetOperator.cpp') diff --git a/src/core/function/CharsetOperator.cpp b/src/core/function/CharsetOperator.cpp index 0e40e317..72c5e72b 100644 --- a/src/core/function/CharsetOperator.cpp +++ b/src/core/function/CharsetOperator.cpp @@ -117,12 +117,10 @@ bool GpgFrontend::CharsetOperator::Convert2Utf8(const std::string &buffer, if (status == U_BUFFER_OVERFLOW_ERROR) { status = U_ZERO_ERROR; - target_limit = target_capacity + 1; out_buffer.clear(); out_buffer.resize(target_capacity); - target_capacity = - ucnv_convert(from_encode.c_str(), to_encode.c_str(), out_buffer.data(), - out_buffer.size(), buffer.data(), buffer.size(), &status); + ucnv_convert(from_encode.c_str(), to_encode.c_str(), out_buffer.data(), + out_buffer.size(), buffer.data(), buffer.size(), &status); } if (U_FAILURE(status)) { -- cgit v1.2.3