Skip to content

Commit 0f45608

Browse files
authored
Merge pull request #530 from pi-vo/positive-infinity
Fix positive infinity in TypeModel.
2 parents 9e2b96d + ba63a48 commit 0f45608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

XmlSchemaClassGenerator/TypeModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ public override CodeExpression GetDefaultValueFor(string defaultString, bool att
13311331
else if (type == typeof(double) && !string.IsNullOrWhiteSpace(defaultString))
13321332
{
13331333
if (defaultString.Equals("inf", StringComparison.OrdinalIgnoreCase))
1334-
return new CodePrimitiveExpression(double.NegativeInfinity);
1334+
return new CodePrimitiveExpression(double.PositiveInfinity);
13351335
else if (defaultString.Equals("-inf", StringComparison.OrdinalIgnoreCase))
13361336
return new CodePrimitiveExpression(double.NegativeInfinity);
13371337
}

0 commit comments

Comments
 (0)