about summary refs log tree commit diff stats
path: root/306files.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-16 09:36:38 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-16 09:36:38 -0700
commit985e85cc56cd8099a04b46bf0e5a2d2ca521e862 (patch)
tree69a3ef3e7ed7c964e4057cfee02eaf7dc95ae8d2 /306files.subx
parentfecb649b9ac20397f8eec017be63864db4e571bb (diff)
downloadmu-985e85cc56cd8099a04b46bf0e5a2d2ca521e862.tar.gz
6788
Diffstat (limited to '306files.subx')
-rw-r--r--306files.subx3
1 files changed, 3 insertions, 0 deletions
diff --git a/306files.subx b/306files.subx
index bbeece76..f547e8e1 100644
--- a/306files.subx
+++ b/306files.subx
@@ -44,6 +44,9 @@ open:  # filename: (addr array byte), write?: boolean, out: (addr handle buffere
     89/<- %ecx 0/r32/eax
     # restore edx
     5a/pop-to-edx
+    # if fd < 0 return
+    3d/compare-eax-with 0/imm32
+    7c/jump-if-< $open:end/disp8
     # allocate a buffered-file
     (allocate Heap 0x1010 *(ebp+0x10))  # file-buffer-size + 16 for other fields
     # var out-addr/edi: (addr buffered-file)