8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:43:04 +01:00

Fix #7179 - Wrong error message - "string right truncation. expected length 30, actual 30"

This commit is contained in:
Adriano dos Santos Fernandes 2022-05-11 15:00:49 -03:00
parent bdd2332115
commit dd18a3b11b

View File

@ -929,7 +929,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)