File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -977,18 +977,20 @@ SLONG blb::BLB_lseek(USHORT mode, SLONG offset)
977977 if (!(blb_flags & BLB_stream))
978978 ERR_post (Arg::Gds (isc_bad_segstr_type));
979979
980+ SINT64 position = offset;
981+
980982 if (mode == 1 )
981- offset += blb_seek;
983+ position += blb_seek;
982984 else if (mode == 2 )
983- offset = blb_length + offset ;
985+ position + = blb_length;
984986
985- if (offset < 0 )
986- offset = 0 ;
987+ if (position < 0 )
988+ position = 0 ;
987989
988- if (offset > (SLONG) blb_length)
989- offset = blb_length;
990+ if (position > blb_length)
991+ position = blb_length;
990992
991- blb_seek = offset ;
993+ blb_seek = (FB_UINT64) position ;
992994 blb_flags |= BLB_seek;
993995 blb_flags &= ~BLB_eof;
994996
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ class blb : public pool_alloc<type_blb>
154154 ULONG blb_temp_id; // ID of newly created blob in transaction
155155 ULONG blb_sequence; // Blob page sequence
156156 ULONG blb_lead_page; // First page number
157- ULONG blb_seek; // Seek location
157+ FB_UINT64 blb_seek; // Seek location
158158 ULONG blb_max_sequence; // Number of data pages
159159 ULONG blb_count; // Number of segments
160160
You can’t perform that action at this time.
0 commit comments