extras/physfsunpack.c
changeset 1631 1aec60db9326
parent 868 87ea5fcab4e9
--- a/extras/physfsunpack.c	Sat Nov 11 08:53:23 2017 -0500
+++ b/extras/physfsunpack.c	Tue Feb 20 10:26:33 2018 -0500
@@ -28,7 +28,7 @@
 static void fail(const char *what, const char *why)
 {
     if (why == NULL)
-        why = PHYSFS_getLastError();
+        why = PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode());
     fprintf(stderr, "%s failed: %s\n", what, why);
     failure = 1;
 } /* fail */
@@ -150,21 +150,21 @@
 
     if (!PHYSFS_init(argv[0]))
     {
-        fprintf(stderr, "PHYSFS_init() failed: %s\n", PHYSFS_getLastError());
+        fprintf(stderr, "PHYSFS_init() failed: %s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
         return 2;
     } /* if */
 
     if (!PHYSFS_setWriteDir(argv[2]))
     {
         fprintf(stderr, "PHYSFS_setWriteDir('%s') failed: %s\n",
-                argv[2], PHYSFS_getLastError());
+                argv[2], PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
         return 3;
     } /* if */
 
     if (!PHYSFS_mount(argv[1], NULL, 1))
     {
         fprintf(stderr, "PHYSFS_mount('%s') failed: %s\n",
-                argv[1], PHYSFS_getLastError());
+                argv[1], PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
         return 4;
     } /* if */