Fix a bug with the file handling for the tape punch

This commit is contained in:
CrazyEttin 2022-08-19 00:50:09 +03:00
parent 152d2d107f
commit 2c2c386e05
1 changed files with 10 additions and 1 deletions

View File

@ -267,7 +267,16 @@ begin
//Punch
if Punch.Path <> '' then begin
assign (TapeOut, Punch.Path);
if Punch.Reset then begin
if FileExists (Punch.Path) = false then begin
try
rewrite (TapeOut);
write (TapeOut, R [X]);
close (TapeOut);
Punch.Reset := false;
except
end;
end
else if Punch.Reset then begin
try
rewrite (TapeOut);
write (TapeOut, R [X]);