Skip to content

Commit 3767f22

Browse files
authored
Error for the GithubIssue98 test fixed (#130)
1 parent 4ff5db0 commit 3767f22

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ProjNet/IO/CoordinateSystems/CoordinateSystemWktReader.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
using System;
3939
using System.Collections.Generic;
4040
using System.IO;
41+
using System.Linq;
4142
using System.Runtime.InteropServices.ComTypes;
4243
using System.Text;
4344
using ProjNet.CoordinateSystems;
@@ -458,8 +459,13 @@ private static CompoundCoordinateSystem ReadCompoundCoordinateSystem(WktStreamTo
458459
tokenizer.ReadToken(",");
459460
tokenizer.NextToken();
460461
var headcs = ReadCoordinateSystem(null, tokenizer);
461-
tokenizer.ReadToken(",");
462-
tokenizer.NextToken();
462+
463+
var ct = tokenizer.NextToken();
464+
while (ct != TokenType.Eol && ct != TokenType.Eof && new[] { ",", "]"}.Contains(tokenizer.GetStringValue()))
465+
{
466+
ct = tokenizer.NextToken();
467+
468+
}
463469
var tailcs = ReadCoordinateSystem(null, tokenizer);
464470

465471
string authority = string.Empty;

0 commit comments

Comments
 (0)