diff --git a/lib/node-xml.js b/lib/node-xml.js index 672c44d..03af6b3 100755 --- a/lib/node-xml.js +++ b/lib/node-xml.js @@ -631,7 +631,7 @@ XMLP.prototype._replaceEntities = function(strD, iB, iE) { iEB = strD.indexOf("&", iB); iEE = iB; - while((iEB > 0) && (iEB < iE)) { + while((iEB > -1) && (iEB < iE)) { strRet += strD.substring(iEE, iEB); iEE = strD.indexOf(";", iEB) + 1;