8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:43:04 +01:00

Patch wrong condition in loop

This commit is contained in:
brodsom 2003-04-09 11:41:26 +00:00
parent 1205d8c4e5
commit 21ce4ddb65

View File

@ -293,7 +293,7 @@ size_t SortMem::read(STATUS *status, size_t position, char *address, size_t leng
assert(block);
// Read data from as many blocks as necessary
for (Block *itr = block; itr, length > 0; itr = itr->next, pos = 0)
for (Block *itr = block; itr && length > 0; itr = itr->next, pos = 0)
{
size_t n = itr->read(status, pos, address, length);
address += n;
@ -333,7 +333,7 @@ size_t SortMem::write(STATUS *status, size_t position, char *address, size_t len
assert(block);
// Write data to as many blocks as necessary
for (Block *itr = block; itr, length > 0; itr = itr->next, pos = 0)
for (Block *itr = block; itr && length > 0; itr = itr->next, pos = 0)
{
size_t n = itr->write(status, pos, address, length);
address += n;