@@ -2777,9 +2777,9 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
27772777 const auto format = MET_format (vdr_tdbb, relation, header->rhd_format );
27782778 auto remainingLength = format->fmt_length ;
27792779
2780- auto calculateLength = [fragment, remainingLength](ULONG length, const UCHAR* data)
2780+ auto calculateLength = [remainingLength](ULONG length, const UCHAR* data, bool notPacked )
27812781 {
2782- if (fragment-> rhdf_flags & rhd_not_packed )
2782+ if (notPacked )
27832783 {
27842784 if (length > remainingLength)
27852785 {
@@ -2798,7 +2798,8 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
27982798 return Compressor::getUnpackedLength (length, data);
27992799 };
28002800
2801- remainingLength -= calculateLength (length, p);
2801+ bool notPacked = (fragment->rhdf_flags & rhd_not_packed) != 0 ;
2802+ remainingLength -= calculateLength (length, p, notPacked);
28022803
28032804 // Next, chase down fragments, if any
28042805
@@ -2850,7 +2851,8 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
28502851 length -= RHD_SIZE;
28512852 }
28522853
2853- remainingLength -= calculateLength (length, p);
2854+ notPacked = (fragment->rhdf_flags & rhd_not_packed) != 0 ;
2855+ remainingLength -= calculateLength (length, p, notPacked);
28542856
28552857 page_number = fragment->rhdf_f_page ;
28562858 line_number = fragment->rhdf_f_line ;
0 commit comments