From afafd85378c79e940272fcd6a0c14554f4b5cc06 Mon Sep 17 00:00:00 2001 From: angelo Date: Fri, 13 Sep 1996 08:08:54 +0000 Subject: [PATCH] Corretto il ciclo infinito per ricercare la parentesi angolare chiusa. git-svn-id: svn://10.65.10.50/trunk@3585 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/text.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/text.cpp b/include/text.cpp index 18af04cd2..0707e3601 100755 --- a/include/text.cpp +++ b/include/text.cpp @@ -234,8 +234,12 @@ void TTextfile::read_line ( // else fill with whitespace TToken_string id(80, '@'); sp++; - while ((ch = *sp++) != '>') - id << ch; + bool terminated = FALSE; + while ((ch = *sp++) != '>' && !terminated) + if (ch != '\0') + id << ch; + else terminated = TRUE; + if (terminated) break; // Esce dal ciclo se non trova la matching > // id contains tokenstring separated by @ // but with casinations for possible lack of spacing // add spaces if needed