From cdd487686fb52d3f501249dae9ef868e7bd74c97 Mon Sep 17 00:00:00 2001 From: unlimitedbacon Date: Tue, 27 Oct 2015 00:49:24 -0700 Subject: [PATCH] Make sure createDirectory sets Z on success --- src/00/filesystem.asm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/00/filesystem.asm b/src/00/filesystem.asm index 8a5684d..0a96fe2 100644 --- a/src/00/filesystem.asm +++ b/src/00/filesystem.asm @@ -612,6 +612,7 @@ _: ; Move DE to end of file entry ei _: pop af pop ix + cp a ret .exitError: pop hl @@ -699,12 +700,14 @@ _: push de ld de, 0 .createEntry: call createDirectoryEntry + jr nz, .error2 inc sp \ inc sp ; pop hl pop de pop af jp po, _ ei _: pop af + cp a ret .error: pop hl @@ -718,6 +721,16 @@ _: pop af or 1 ld a, errFileNotFound ret + .error2: + inc sp \ inc sp ; pop hl + pop de + pop af + jp po, _ + ei +_: pop af + or 1 + ld a, errFilesystemFull + ret ; findNode ; Finds a node in the FAT.