Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 87875 invoked by uid 500); 7 Dec 2001 19:29:17 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 87864 invoked from network); 7 Dec 2001 19:29:16 -0000 Date: 7 Dec 2001 19:09:58 -0000 Message-ID: <20011207190958.22921.qmail@icarus.apache.org> From: dbertoni@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/c/Tests/Conf conf.cpp X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N dbertoni 01/12/07 11:09:58 Modified: c/Tests/Conf conf.cpp Log: Check to make sure path separator was foun. Revision Changes Path 1.17 +9 -4 xml-xalan/c/Tests/Conf/conf.cpp Index: conf.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/Tests/Conf/conf.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- conf.cpp 2001/12/04 19:20:48 1.16 +++ conf.cpp 2001/12/07 19:09:58 1.17 @@ -248,11 +248,16 @@ // Do we need to set the default output directory?? if (fsetOut) { - unsigned int ii = lastIndexOf(baseDir,charAt(pathSep,0)); - outDir = substring(baseDir, 0, ii+1); - append(outDir,XalanDOMString("CONF-results")); + const unsigned int ii = lastIndexOf(baseDir,charAt(pathSep,0)); + + if (ii < length(baseDir)) + { + outDir = substring(baseDir, 0, ii + 1); + } + + append(outDir, XalanDOMString("CONF-results")); f.checkAndCreateDir(outDir); - append(outDir,pathSep); + append(outDir, pathSep); } if (fsetGold) { --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org