test/test_physfs.c
changeset 101 bd18e17ad6ad
parent 74 a4a5066fb640
child 108 90f7ad8a0ab5
--- a/test/test_physfs.c	Fri Sep 14 22:59:53 2001 +0000
+++ b/test/test_physfs.c	Wed Sep 26 01:44:41 2001 +0000
@@ -242,6 +242,7 @@
 
 static int cmd_setsaneconfig(char *args)
 {
+    char *org;
     char *appName;
     char *arcExt;
     int inclCD;
@@ -249,18 +250,16 @@
     char *ptr = args;
 
         /* ugly. */
-    appName = ptr;
+    org = ptr;
+    ptr = strchr(ptr, ' '); *ptr = '\0'; ptr++; appName = ptr;
     ptr = strchr(ptr, ' '); *ptr = '\0'; ptr++; arcExt = ptr;
     ptr = strchr(ptr, ' '); *ptr = '\0'; ptr++; inclCD = atoi(arcExt);
     arcsFirst = atoi(ptr);
 
-    if (strcmp(appName, "!") == 0)
-        appName = NULL;
-
     if (strcmp(arcExt, "!") == 0)
         arcExt = NULL;
 
-    if (PHYSFS_setSaneConfig(appName, arcExt, inclCD, arcsFirst))
+    if (PHYSFS_setSaneConfig(org, appName, arcExt, inclCD, arcsFirst))
         printf("Successful.\n");
     else
         printf("Failure. reason: %s.\n", PHYSFS_getLastError());