From cb465e00d867de98d5ce33af73e6afc0db80a115 Mon Sep 17 00:00:00 2001 From: Cannnabis Date: Sat, 28 Nov 2026 02:42:25 +0700 Subject: [PATCH] framegen: PLAY_FRAMEGEN.cmd check returns the check's answer The check branch exited 0 whatever the script said, so a caller of "PLAY_FRAMEGEN.cmd check" read success on a failed check (the script exits 1 with the game folder not found). The branch is no longer a block, so errorlevel is the script's own, read where it was set. --- PLAY_FRAMEGEN.cmd | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PLAY_FRAMEGEN.cmd b/PLAY_FRAMEGEN.cmd index 2598f9ed..d3d28bbf 100644 --- a/PLAY_FRAMEGEN.cmd +++ b/PLAY_FRAMEGEN.cmd @@ -12,11 +12,12 @@ if not exist "%PS1%" ( pause exit /b 1 ) -if /i "%~1"=="check" ( - %PSH% -NoProfile -ExecutionPolicy Bypass -File "%PS1%" -Check - pause - exit /b 0 -) +if /i not "%~1"=="check" goto :menu +%PSH% -NoProfile -ExecutionPolicy Bypass -File "%PS1%" -Check +pause +rem The check's answer is what callers read: a failed check says so. +exit /b %errorlevel% +:menu set "PICK=%~1" if not "%PICK%"=="" goto :run