From c28ce5f78816ca312b4531b1ac747bd7fd1427bb Mon Sep 17 00:00:00 2001
From: "Nicolas \"Pixel\" Noble" <pixel@nobis-crew.org>
Date: Mon, 10 Aug 2009 00:33:01 +0200
Subject: Yet another fix for C89 stupidneess.

---
 mpq-bios.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mpq-bios.c b/mpq-bios.c
index 79b6512..aa0b6c8 100644
--- a/mpq-bios.c
+++ b/mpq-bios.c
@@ -535,7 +535,6 @@ int mpqlib_find_hash_entry_by_name(struct mpq_archive_t * mpq_a, const char * na
 }
 
 uint64_t mpqlib_ioctl(struct mpq_archive_t * mpq_a, enum mpqlib_ioctl_t command, ...) {
-    __mpqlib_errno = MPQLIB_ERROR_NO_ERROR;
     uint64_t r = 0;
     uint32_t u32;
     uint64_t u64;
@@ -544,6 +543,8 @@ uint64_t mpqlib_ioctl(struct mpq_archive_t * mpq_a, enum mpqlib_ioctl_t command,
     va_list ap;
     va_start(ap, command);
     
+    __mpqlib_errno = MPQLIB_ERROR_NO_ERROR;
+
     switch(command) {
     case MPQLIB_IOCTL_NO_ACTION:
         break;
-- 
cgit v1.2.3