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

Correction.

This commit is contained in:
dimitr 2010-04-18 00:36:30 +00:00
parent 3e567e92e9
commit 9774b2ce29

View File

@ -1559,14 +1559,9 @@ static USHORT get_format_length(ISC_STATUS* status_vector, isc_db_handle databas
buffer.resize(return_length);
USHORT count = buffer[0] | (buffer[1] << 8);
USHORT format_length = 0;
for (const Ods::Descriptor* desc = (Ods::Descriptor*) &buffer[2]; count--; desc++)
{
format_length += desc->dsc_length;
}
return format_length;
const USHORT count = buffer[0] | (buffer[1] << 8);
const Ods::Descriptor* const desc = (Ods::Descriptor*) &buffer[2] + count - 1;
return desc->dsc_offset + desc->dsc_length;
}