diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-12-18 03:38:02 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-12-18 03:38:02 +0000 |
commit | d10ebb2a7ad78029474186b7e610fe1611d3bcd8 (patch) | |
tree | e561322603ec638ca7aa678ec9dd3430580dcc2e | |
parent | 09caaa0fed198a2b62fc154f04c66dd7c7369ce8 (diff) |
""
svn path=/trunk/; revision=1226
-rw-r--r-- | externals/grill/pool/pool.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/externals/grill/pool/pool.cpp b/externals/grill/pool/pool.cpp index 76a61cc0..4d6d100e 100644 --- a/externals/grill/pool/pool.cpp +++ b/externals/grill/pool/pool.cpp @@ -616,12 +616,15 @@ static bool gettag(istream &is,xmltag &tag) } if(!*c) { // is comment - char cmp[2] = {0,0}; + char cmp[2] = {0,0}; // set to some unusual initial value + for(int ic = 0; ; ic = (++ic)%2) { char c = is.get(); if(c == '>') { - for(int i = 0; i < 2 && cmp[(ic+i)%2] == commend[i]; ++i); - if(i == 2) break; // comment end! + // if third character is > then check also the former two + int i; + for(i = 0; i < 2 && cmp[(ic+i)%2] == commend[i]; ++i); + if(i == 2) break; // match: comment end found! } else cmp[ic] = c; |