Skip to content

Commit 9c552d0

Browse files
committed
Correction according to dyemanov
1 parent a98863a commit 9c552d0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/jrd/recsrc/TableValueFunctionScan.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,12 @@ bool GenSeriesFunctionScan::nextBuffer(thread_db* tdbb) const
522522
fromDesc.makeInt64(impure->m_scale, &result);
523523
assignParameter(tdbb, &fromDesc, toDesc, 0, record);
524524

525-
// Fixes freezing at boundary values.
526-
if (((step < 0) && (result == MIN_SINT64)) ||
525+
// Prevent freezing at boundary values
526+
if (((step < 0) && (result == MIN_SINT64)) ||
527527
((step > 0) && (result == MAX_SINT64)))
528+
{
528529
impure->m_step.vlu_int64 = 0;
530+
}
529531
else
530532
result += step;
531533

@@ -551,10 +553,12 @@ bool GenSeriesFunctionScan::nextBuffer(thread_db* tdbb) const
551553
fromDesc.makeInt128(impure->m_scale, &result);
552554
assignParameter(tdbb, &fromDesc, toDesc, 0, record);
553555

554-
// Fixes freezing at boundary values.
556+
// Prevent freezing at boundary values
555557
if (((step.sign() < 0) && (result.compare(MIN_Int128) == 0)) ||
556558
((step.sign() > 0) && (result.compare(MAX_Int128) == 0)))
559+
{
557560
impure->m_step.vlu_int128.set(0, 0);
561+
}
558562
else
559563
result = result.add(step);
560564
impure->m_result.vlu_int128 = result;

0 commit comments

Comments
 (0)