diff options
author | Nikolai Pretzell <np@openoffice.org> | 2001-06-12 13:38:15 +0000 |
---|---|---|
committer | Nikolai Pretzell <np@openoffice.org> | 2001-06-12 13:38:15 +0000 |
commit | 0b9c4226550b84530752da8e3222324cf623915b (patch) | |
tree | d6e613bccf7e18fd173921787edaef7b0a2c5979 /soltools/giparser | |
parent | 048dbc245961c6e15fb62b419239fdbf772a2968 (diff) |
Fix handling of empty ines.
Diffstat (limited to 'soltools/giparser')
-rw-r--r-- | soltools/giparser/gi_parse.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/soltools/giparser/gi_parse.cxx b/soltools/giparser/gi_parse.cxx index 5ba7060df7aa..4c56e10ab586 100644 --- a/soltools/giparser/gi_parse.cxx +++ b/soltools/giparser/gi_parse.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gi_parse.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: np $ $Date: 2001-06-11 16:04:51 $ + * last change: $Author: np $ $Date: 2001-06-12 14:38:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -203,7 +203,7 @@ GenericInfo_Parser::ReadLine( istream & i_rSrc ) i_rSrc.get(sInput, nInputSize); UINT32 nGot = UINT32(i_rSrc.gcount()); - if (nGot == 0) + if (nGot == 0 && i_rSrc.eof()) { bGoon = false; return; @@ -257,7 +257,7 @@ GenericInfo_Parser::ClassifyLine() case '{': return lt_open_list; case '}': return lt_close_list; case '#': return lt_comment; - case '0': return lt_empty; + case '\0': return lt_empty; } return lt_key; @@ -277,6 +277,7 @@ GenericInfo_Parser::ReadKey() pSearch, strlen(pSearch), sCurComment.str(), sCurComment.l() ); + sCurComment = ""; } void |