From d10ebb2a7ad78029474186b7e610fe1611d3bcd8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 18 Dec 2003 03:38:02 +0000 Subject: "" svn path=/trunk/; revision=1226 --- externals/grill/pool/pool.cpp | 9 ++++++--- 1 file 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; -- cgit v1.2.1