From: sECuRE Date: Tue, 6 Jan 2009 09:08:45 +0000 (+0000) Subject: Speicherfehler behoben (Danke Sascha) X-Git-Tag: rgb2rv6~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c4ab4903331996c7fdc78b1259e8b0efa021c472;p=c128-kasse Speicherfehler behoben (Danke Sascha) git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@91 af93e077-1a23-4f1e-9cbe-9382a9d578f5 --- diff --git a/src/config.c b/src/config.c index 5de39a4..34a09a2 100644 --- a/src/config.c +++ b/src/config.c @@ -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);