Browse Source

* database.c : imdb_write_rec() fix return value

master
Alex 'AdUser' Z 10 years ago
parent
commit
b23d19e479
  1. 5
      src/database.c

5
src/database.c

@ -162,7 +162,10 @@ int imdb_write_rec(imdb_t *db, imdb_rec_t *rec)
DB_SEEK(db, rec->num * IMDB_REC_LEN);
DB_WRITE(db, rec->data, IMDB_REC_LEN);
return bytes / IMDB_REC_LEN;
if (bytes != IMDB_REC_LEN)
return -1;
return 1;
}
int imdb_read_blk(imdb_t *db, imdb_block_t *blk)

Loading…
Cancel
Save