aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-03 13:51:41 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-03 13:51:41 +0100
commit2d8f295354ce20f2d375a985ff48fd5e7f8b90ca (patch)
tree1fb113fb542eca8cc1387fbf4eb23b1e3ab38114 /src
parent98ebc4687a1bc601589ff9b1769008c5c4a891d2 (diff)
downloadPROJ-2d8f295354ce20f2d375a985ff48fd5e7f8b90ca.tar.gz
PROJ-2d8f295354ce20f2d375a985ff48fd5e7f8b90ca.zip
WKTParser: fix to avoid creation of empty nodes
Diffstat (limited to 'src')
-rw-r--r--src/io.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/io.cpp b/src/io.cpp
index bfba9ed6..e8dbd147 100644
--- a/src/io.cpp
+++ b/src/io.cpp
@@ -1038,6 +1038,10 @@ WKTNodeNNPtr WKTNode::createFrom(const std::string &wkt, size_t indexStart,
assert(indexEndChild > i);
i = indexEndChild;
i = skipSpace(wkt, i);
+ if (i < wkt.size() && wkt[i] == ',') {
+ ++i;
+ i = skipSpace(wkt, i);
+ }
}
if (i == wkt.size() || (wkt[i] != ']' && wkt[i] != ')')) {
throw ParsingException("missing ]");