more precautions to prevent potential errors while reading prompts

This commit is contained in:
mysticbbs 2012-07-12 21:23:27 -04:00
parent 14c0341265
commit 6f037b3258
1 changed files with 4 additions and 3 deletions

View File

@ -231,9 +231,10 @@ Begin
FileMode := 66;
{$I-}
Reset (PromptFile);
Seek (PromptFile, N);
Read (PromptFile, Prompt);
Assign (PromptFile, Config.DataPath + Theme.FileName + '.thm');
Reset (PromptFile);
Seek (PromptFile, N);
Read (PromptFile, Prompt);
{$I+}
If IoResult <> 0 Then Begin