From b8b136dc8b077d8ac3195528c99b856a5dc3970f Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sun, 9 Aug 2009 22:11:22 +0200 Subject: Fixing a few error messages. --- mpq-fs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mpq-fs.c') diff --git a/mpq-fs.c b/mpq-fs.c index c2934f8..f608c24 100644 --- a/mpq-fs.c +++ b/mpq-fs.c @@ -5,6 +5,8 @@ #include "hashtab.h" #include "mpq-fs.h" #include "mpq-misc.h" +#include "mpq-errors.h" +#include "errors.h" #include "stalloc.h" #define MAX_FNAME 2048 @@ -122,12 +124,15 @@ struct mpq_file_t * mpqlib_fs_open(const char * _fname) { hash_entry * entry; entry = find_file(fname); + __mpqlib_errno = MPQLIB_ERROR_NO_ERROR; free(fname); if (entry) { return mpqlib_open_file(entry->mpq_a, entry->entry); } + + __mpqlib_errno = MPQLIB_ERROR_FILE_NOT_FOUND; return NULL; } -- cgit v1.2.3