Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Eventually the change to convert_user_fcb is identical, but the problem was inside bdos_LOGINDRIVE. It would return C=1 if the drive was already logged in and hence convert_user_fcb would return with carry set in that case, which was wrong.
I separated both fixes in two commits. Ran a multitude of tests for about 15 minutes so I'm reasonably confident I didn't break anything this time.
As a bonus bdos_LOGINDRIVE has a proper return value in C now. There's no error handling during construction of the bitmap, but that could be added later and is outside the scope of this patch.