mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 07:23:04 +01:00
Make sure at least one operand is widened before the multiplication.
This commit is contained in:
parent
a82fbb6fca
commit
5601b1f5bc
@ -2883,8 +2883,8 @@ dsc* SysFunction::substring(thread_db* tdbb, impure_value* impure,
|
||||
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
|
||||
CharSet* charSet = INTL_charset_lookup(tdbb, value->getCharSet());
|
||||
|
||||
const FB_UINT64 byte_offset = offset * charSet->maxBytesPerChar();
|
||||
const FB_UINT64 byte_length = length * charSet->maxBytesPerChar();
|
||||
const FB_UINT64 byte_offset = FB_UINT64(offset) * charSet->maxBytesPerChar();
|
||||
const FB_UINT64 byte_length = FB_UINT64(length) * charSet->maxBytesPerChar();
|
||||
|
||||
if (charSet->isMultiByte())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user