From c892ac011494f41fdf43c00d1a940612aa7e1a45 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sun, 9 Aug 2009 21:37:45 +0200 Subject: Fixing mpqlib_read; ioctl needs buffer in as well... --- mpq-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpq-file.c b/mpq-file.c index 547d611..608f42d 100644 --- a/mpq-file.c +++ b/mpq-file.c @@ -137,7 +137,7 @@ static int cache_sector(struct mpq_file_t * mpq_f, int sector) { if (mpq_f->current_sector != sector) { int il, ol; mpqlib_ioctl(mpq_f->mpq_a, MPQLIB_IOCTL_SEEK, mpq_f->offsets[sector]); - mpqlib_ioctl(mpq_f->mpq_a, MPQLIB_IOCTL_READ, mpq_f->sizes[sector]); + mpqlib_ioctl(mpq_f->mpq_a, MPQLIB_IOCTL_READ, in_buf, mpq_f->sizes[sector]); mpq_f->current_sector = sector; il = ol = sector == (mpq_f->number_of_sectors - 1) ? mpq_f->remaining_bytes : mpq_f->sector_size; -- cgit v1.2.3