]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
zfile: Free the current list item, not the next (+ two minor fixes)
authorFrode Solheim <frode@fs-uae.net>
Fri, 1 Aug 2025 14:43:56 +0000 (16:43 +0200)
committerFrode Solheim <frode@fs-uae.net>
Fri, 1 Aug 2025 14:43:56 +0000 (16:43 +0200)
include/zfile.h
zfile.cpp

index b7f096911228ea217186dbbfe4869f38d3307fff..915c5580fa46176e15cd414cbe2a05ede2d4f282 100644 (file)
@@ -1,4 +1,3 @@
- /*
  /*
   * UAE - The Un*x Amiga Emulator
   *
index f1f968432462f1064e3c3a04139e70b06f602a1a..661f17d19dd2df930617687ab2ffe47c27c9a290 100644 (file)
--- a/zfile.cpp
+++ b/zfile.cpp
@@ -138,7 +138,7 @@ static void zcache_close (void)
        while (zc) {
                struct zcache *n = zc->next;
                zcache_free_data (zc);
-               xfree (n);
+               xfree(zc);
                zc = n;
        }
 }
@@ -1788,7 +1788,7 @@ static struct zfile *zfile_fopen_x (const TCHAR *name, const TCHAR *mode, int ma
 
        if (_tcslen (name) == 0)
                return NULL;
-       manglefilename(name, path, sizeof(path) / sizeof TCHAR);
+       manglefilename(name, path, sizeof(path) / sizeof(TCHAR));
        l = zfile_fopen_2 (path, mode, mask);
        if (!l)
                return 0;