commit 0a256265b61b784975967a2b85637cb65b1bbecd
parent 067050777e0de5f489b908b2e66be51945a546b7
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Mon, 26 Jun 2023 16:40:51 -0400
fs/fat: fix :open initialization bug
"putback" wasn't initialized, resulting in wrongful putbacks when a cursor was
reused.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fs/fatlo.fs b/fs/fs/fatlo.fs
@@ -181,7 +181,7 @@ extends File struct[ FATFile
: :open ( direntry self -- )
r! :hold dup V1 :fat :getid ( dirent entryoff ) \ V1=self
r@ to entryoff DirEntry filesize r@ to size ( )
- 0 to r@ pos -1 to r> clusteridx ;
+ 0 to r@ putback 0 to r@ pos -1 to r> clusteridx ;
: :new ( fat -- hdl )
dup FAT drv SectorWindow :new