]> git.sur5r.net Git - c128-kasse/commitdiff
Speicherfehler behoben (Danke Sascha)
authorsECuRE <sECuRE@af93e077-1a23-4f1e-9cbe-9382a9d578f5>
Tue, 6 Jan 2009 09:08:45 +0000 (09:08 +0000)
committersECuRE <sECuRE@af93e077-1a23-4f1e-9cbe-9382a9d578f5>
Tue, 6 Jan 2009 09:08:45 +0000 (09:08 +0000)
git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@91 af93e077-1a23-4f1e-9cbe-9382a9d578f5

src/config.c

index 5de39a4875b6bfbbd186f5916a0bdccf04ade703..34a09a21b863ea7591fbfab9763e626625127cc1 100644 (file)
@@ -38,18 +38,18 @@ struct credits_array_t credits;
  */
 static void lookup_needed_files() {
        BYTE lfn = 8;
-       struct cbm_dirent *dirent;
+       struct cbm_dirent dirent;
 
        if (cbm_opendir(lfn, (BYTE)8) != 0) {
                cprintf("could not open directory\r\n");
                return;
        }
-       while (cbm_readdir(lfn, dirent) == 0) {
-               if (strncmp(dirent->name, "log", 3) == 0)
+       while (cbm_readdir(lfn, &dirent) == 0) {
+               if (strncmp(dirent.name, "log", 3) == 0)
                        log_num++;
-               if (strcasecmp(dirent->name, "items") == 0)
+               if (strcasecmp(dirent.name, "items") == 0)
                        items_exists = true;
-               if (strcasecmp(dirent->name, "credits") == 0)
+               if (strcasecmp(dirent.name, "credits") == 0)
                        credits_exists = true;
        }
        cbm_closedir(lfn);