Skip to content

Commit

Permalink
Fix #7179 - Wrong error message - "string right truncation. expected …
Browse files Browse the repository at this point in the history
…length 30, actual 30"
  • Loading branch information
asfernandes committed May 11, 2022
1 parent eb7187c commit 43769c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jrd/intl.cpp
Expand Up @@ -931,7 +931,8 @@ int INTL_convert_string(dsc* to, const dsc* from, Firebird::Callbacks* cb)
break;
}

const ULONG src_len = toCharSet->length(toLength, start, false);
CharSet* const fromCharSet = INTL_charset_lookup(tdbb, from_cs);
const ULONG src_len = fromCharSet->length(from_len, from_ptr, false);
const ULONG dest_len = (ULONG) to_size / toCharSet->maxBytesPerChar();

if (toCharSet->isMultiByte() && src_len > dest_len)
Expand Down

0 comments on commit 43769c4

Please sign in to comment.