trivial patch to avoid string assertions when entry is empty rs=jband

git-svn-id: svn://10.0.0.236/trunk@108828 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jband%netscape.com 2001-11-22 23:32:49 +00:00
parent 2f06cb4e7d
commit 26f6f3a656
2 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@ nsJARURI::SetSpec(const char * aSpec)
nsCAutoString entry(aSpec);
entry.Cut(0, pos + 2); // 2 == strlen(NS_JAR_DELIMITER)
while (entry.CharAt(0) == '/')
while (entry.Length() && entry.CharAt(0) == '/')
entry.Cut(0,1); // Strip any additional leading slashes from entry path
rv = serv->ResolveRelativePath(entry.get(), nsnull, &mJAREntry);

View File

@ -152,7 +152,7 @@ nsJARURI::SetSpec(const char * aSpec)
nsCAutoString entry(aSpec);
entry.Cut(0, pos + 2); // 2 == strlen(NS_JAR_DELIMITER)
while (entry.CharAt(0) == '/')
while (entry.Length() && entry.CharAt(0) == '/')
entry.Cut(0,1); // Strip any additional leading slashes from entry path
rv = serv->ResolveRelativePath(entry.get(), nsnull, &mJAREntry);