From: Holger Schemel Date: Sun, 17 Feb 2019 21:01:13 +0000 (+0100) Subject: fixed compiler warning X-Git-Tag: 4.1.2.0~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b6d00a8a639220e3589641e843c8594024ce3076;p=rocksndiamonds.git fixed compiler warning --- diff --git a/src/libgame/zip/miniunz.c b/src/libgame/zip/miniunz.c index b068486e..285d10ed 100644 --- a/src/libgame/zip/miniunz.c +++ b/src/libgame/zip/miniunz.c @@ -639,7 +639,14 @@ char **zip_extract(char *filename, char *directory) int success = (miniunz_extract_all(uf, 0, 1, NULL) == UNZ_OK); - CHDIR(last_directory); // change back to previous directory + if (CHDIR(last_directory)) // change back to previous directory + { + debug_printf("Cannot change to directory '%s'!\n", last_directory); + + unzClose(uf); + + return NULL; + } unzClose(uf);