commanderx16 / x16-rom

Other
153 stars 43 forks source link

fat32_errno sometimes not set in error case #240

Open mist64 opened 2 years ago

mist64 commented 2 years ago

@Jaxartes:

a couple of places fat32_errno isn't set, but carry is cleared. One in find_free_cluster after "Check if at end of FAT table" and another in next_sector after "end_of_chain". An experimental patch for that seemed ok.

Jaxartes commented 2 years ago

Trying to fix the next_sector() place results in failure when adding one more sector to the directory. The following program starts failing, then, at "16TH": filesystem-filler.bas.txt

So maybe the thing to do is only fix the find_free_cluster() errno setting, and leave next_sector()'s alone.