Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix batch file 'goto' for previous labels #2384

Merged
merged 1 commit into from Apr 6, 2023
Merged

Conversation

kklobe
Copy link
Collaborator

@kklobe kklobe commented Apr 6, 2023

Commit 7a4ee80 prevented the goto logic from finding a label earlier in the file. This commit just resets the file location to 0 at the beginning of the goto logic so it scans the entire file.

Test file (can't attach a .BAT):

@echo off
:start
echo "Hello"
goto DOIT
echo "Should not see this"
:DOIT
PAUSE
goto start

Reset the file location so the GOTO scanning starts at the top.
@kklobe kklobe added the bug Something isn't working label Apr 6, 2023
@kcgen
Copy link
Member

kcgen commented Apr 6, 2023

My couple batch file examples here that launch games are still working ok.
Very nice exacting touch, kklobe !

@kcgen kcgen self-requested a review April 6, 2023 17:59
@kcgen kcgen merged commit 5da1c79 into main Apr 6, 2023
58 checks passed
@kcgen kcgen deleted the kk/batchfile-goto-fix-1 branch April 8, 2023 01:45
@johnnovak johnnovak added the DOS Issues related to DOS integration or DOS commands label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DOS Issues related to DOS integration or DOS commands
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants