aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/CharsetOperator.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-03-31 19:14:23 +0000
committersaturneric <[email protected]>2023-03-31 19:14:23 +0000
commitd15c83a1697d3798ed19261d2be617099d33a4ad (patch)
treed449ca25b8b7d2eb43e6dfe6187113d96876222c /src/core/function/CharsetOperator.cpp
parentfix: solve ui issues in network settings (diff)
downloadGpgFrontend-d15c83a1697d3798ed19261d2be617099d33a4ad.tar.gz
GpgFrontend-d15c83a1697d3798ed19261d2be617099d33a4ad.zip
fix: solve codacy issues
Diffstat (limited to 'src/core/function/CharsetOperator.cpp')
-rw-r--r--src/core/function/CharsetOperator.cpp6
1 files changed, 2 insertions, 4 deletions
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)) {