@@ -2777,9 +2777,9 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
2777
2777
const auto format = MET_format (vdr_tdbb, relation, header->rhd_format );
2778
2778
auto remainingLength = format->fmt_length ;
2779
2779
2780
- auto calculateLength = [fragment, remainingLength](ULONG length, const UCHAR* data)
2780
+ auto calculateLength = [remainingLength](ULONG length, const UCHAR* data, bool notPacked )
2781
2781
{
2782
- if (fragment-> rhdf_flags & rhd_not_packed )
2782
+ if (notPacked )
2783
2783
{
2784
2784
if (length > remainingLength)
2785
2785
{
@@ -2798,7 +2798,8 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
2798
2798
return Compressor::getUnpackedLength (length, data);
2799
2799
};
2800
2800
2801
- remainingLength -= calculateLength (length, p);
2801
+ bool notPacked = (fragment->rhdf_flags & rhd_not_packed) != 0 ;
2802
+ remainingLength -= calculateLength (length, p, notPacked);
2802
2803
2803
2804
// Next, chase down fragments, if any
2804
2805
@@ -2850,7 +2851,8 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
2850
2851
length -= RHD_SIZE;
2851
2852
}
2852
2853
2853
- remainingLength -= calculateLength (length, p);
2854
+ notPacked = (fragment->rhdf_flags & rhd_not_packed) != 0 ;
2855
+ remainingLength -= calculateLength (length, p, notPacked);
2854
2856
2855
2857
page_number = fragment->rhdf_f_page ;
2856
2858
line_number = fragment->rhdf_f_line ;
0 commit comments