• Robert Sprowson's avatar
    Fix null pointer dereference querying the current format of a disc · 4e2fab9c
    Robert Sprowson authored
    The code that issues Service_IdentifyDisc in order to populate the 'Format > Current Format' menu entry has since the dawn of time passed in R8=0 as the private word pointer. It seems to have thought setting up R12 for the filing system in question was all that was needed, not realising that FileCore ignores Service_IdentifyDisc for all but the base incarnation (R12=0).
    Prior to FileCore 3.50 this didn't seem to matter since FileCore had already messed about reading sectors and hence the map area already existed, FileCore 3.50 is smarter, but as a side effect does need R8 to be valid so the allocation can be apportioned to the right instantiation.
    Menu population ammended to use a different OS_Module call to get the private word, then fiddle it into a private word pointer for the duration of the work.
    
    Tested on IOMD with all 7 floppy types it offers in the menu.
    
    Version 1.06. Tagged as 'ADFSFiler-1_06'
    4e2fab9c
VersionASM 1 KB