diff
20      if (err >= limit)
21 +        if (nrows < MAX_ROWS)  // Assuming MAX_ROWS is the allocated size of rows
22              rows[nrows++] = br + bpr*sy;
