Skip to content

Commit 22fee85

Browse files
committed
Postfix for #8592 - Presence of 'ROWS <n_limit>' causes garbage in error message when string conversion problem raises.
1 parent f00bc3c commit 22fee85

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/jrd/cvt2.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,9 @@ static int cmp_numeric_string(const dsc* arg1, const dsc* arg2, Firebird::Decima
220220

221221
Decimal128 buffer; // enough to fit any required data
222222
SSHORT scale = 0;
223-
UCHAR* text = arg2->dsc_address;
224-
USHORT textLen = TEXT_LEN(arg2);
225-
226-
if (arg2->dsc_dtype == dtype_varying)
227-
{
228-
text += sizeof(USHORT);
229-
textLen -= sizeof(USHORT);
230-
}
223+
UCHAR* text;
224+
USHORT ttype;
225+
USHORT textLen = CVT_get_string_ptr(arg2, &ttype, &text, nullptr, 0, 0);
231226

232227
dsc num2;
233228
num2.dsc_dtype = CVT_get_numeric(text, textLen, &scale, &buffer);

0 commit comments

Comments
 (0)