From edcdfd32317ec33a244b9b53b12e33cc53d23f8e Mon Sep 17 00:00:00 2001 From: Jim Date: Sun, 12 Jul 2015 22:10:31 -0700 Subject: [PATCH] use line input to read a line of a file insdeas of peek, fixes hang on files without "\n" at the end. --- yab-IDE/BuildFactory/BuildFactory.yab | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/yab-IDE/BuildFactory/BuildFactory.yab b/yab-IDE/BuildFactory/BuildFactory.yab index 94bbddb..c871b43 100755 --- a/yab-IDE/BuildFactory/BuildFactory.yab +++ b/yab-IDE/BuildFactory/BuildFactory.yab @@ -314,13 +314,18 @@ end sub // read in one line from the given file ///////////////////////////////////////// sub LineInput$(n) - local tmp : local tmp$ - while (tmp <> 10) - tmp = peek(n) - if (tmp < 0) continue - tmp$ = tmp$ + chr$(tmp) - wend + local tmp : local tmp$ + +// while (tmp <> 10) +// tmp = peek(n) +// if (tmp < 0) continue +// tmp$ = tmp$ + chr$(tmp) +// wend + +// line input allows for final lines without a newline "\n" + +line input #n tmp$ return trim$(tmp$) end sub