From c4ab4903331996c7fdc78b1259e8b0efa021c472 Mon Sep 17 00:00:00 2001 From: sECuRE Date: Tue, 6 Jan 2009 09:08:45 +0000 Subject: [PATCH] Speicherfehler behoben (Danke Sascha) git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@91 af93e077-1a23-4f1e-9cbe-9382a9d578f5 --- src/config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.5