fix repeat char bug
This commit is contained in:
@@ -6861,11 +6861,15 @@ std::wstring uns::OCRCharset::GetString(const std::vector<int>& indexs)
|
||||
}
|
||||
if ((charset_ptr == nullptr))
|
||||
return L"";
|
||||
int last_index = 0;
|
||||
std::wstring result;
|
||||
for (const auto& index : indexs)
|
||||
{
|
||||
if (charset_ptr->find(index) == charset_ptr->end())
|
||||
continue;
|
||||
if (last_index == index)
|
||||
continue;
|
||||
last_index = index;
|
||||
if (index == 0) //Ignore 0 (Invalidate Value)
|
||||
continue;
|
||||
result += (*charset_ptr)[index];
|
||||
|
||||
Reference in New Issue
Block a user