8
0
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:
robocop 2011-02-18 01:21:48 +00:00
parent a82fbb6fca
commit 5601b1f5bc

View File

@ -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())
{