8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 14:03:07 +01:00

Fix a bug,

when end() returns pointer with value 0x0000000 then after -1 this value is bigger as begin()
This commit is contained in:
arnobrinkman 2003-11-30 20:23:10 +00:00
parent 1875ee91a9
commit 4d7319e1af

View File

@ -3064,13 +3064,16 @@ static JRD_NOD pass1(TDBB tdbb,
// can't be invariant. This won't optimize all cases, but it is the simplest
// operating assumption for now.
for (RSE *rse = csb->csb_current_rses.end()-1;
rse >= csb->csb_current_rses.begin(); rse--)
{
if (csb->csb_current_rses.getCount()) {
for (RSE *rse = csb->csb_current_rses.end() - 1;
rse >= csb->csb_current_rses.begin(); rse--)
{
if (stream_in_rse(stream, *rse))
break;
(*rse)->nod_flags |= rse_variant;
if (stream_in_rse(stream, *rse)) {
break;
}
(*rse)->nod_flags |= rse_variant;
}
}
tail = &csb->csb_rpt[stream];
if (!(relation = tail->csb_relation) ||