not part of default build. Make schema decimal validate work correctly

This commit is contained in:
doronr%us.ibm.com 2005-01-27 21:13:36 +00:00
Родитель 3dd5f22d97
Коммит dcbb265390
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -2568,9 +2568,12 @@ PRBool nsSchemaValidator::IsValidSchemaDecimal(const nsAString & aNodeValue,
long temp;
isValid = nsSchemaValidatorUtils::IsValidSchemaInteger(aWholePart, &temp);
if (isValid) {
if ((aFractionPart.First() == '-') || (aFractionPart.First() == '+'))
if (isValid && (findString != kNotFound)) {
// XX: assuming "2." is not valid
if (aFractionPart.IsEmpty())
isValid = PR_FALSE;
else if ((aFractionPart.First() == '-') || (aFractionPart.First() == '+'))
isValid = PR_FALSE;
else
isValid = nsSchemaValidatorUtils::IsValidSchemaInteger(aFractionPart, &temp);