From 58a905073ec3de2d41462ad0910b176236f70a17 Mon Sep 17 00:00:00 2001 From: Xander Mol Date: Wed, 16 Aug 2023 16:46:27 +0200 Subject: [PATCH] Add cbm_close command to fix file open error after error abort I had issues with file open errors, which I could trace back to this function here not closing the logical file number after aborting with an OS error. File open issues for me are solved with adding this cbm_close(lfn); line. --- src/ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ops.c b/src/ops.c index 4c82835..920b985 100644 --- a/src/ops.c +++ b/src/ops.c @@ -125,6 +125,7 @@ dosCommand(const BYTE lfn, const BYTE drive, const BYTE sec_addr, const char *cm int res; if (cbm_open(lfn, drive, sec_addr, cmd) != 0) { + cbm_close(lfn); return _oserror; }