From 7bc794e1668d6a54bdb2b1954e46ad699234483b Mon Sep 17 00:00:00 2001 From: kkdd Date: Wed, 17 Oct 2018 19:57:05 +0900 Subject: [PATCH] address command-count-0 case --- lib/vectortilefeature.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vectortilefeature.js b/lib/vectortilefeature.js index b9880a1..e925ad8 100644 --- a/lib/vectortilefeature.js +++ b/lib/vectortilefeature.js @@ -55,6 +55,7 @@ VectorTileFeature.prototype.loadGeometry = function() { var cmdLen = pbf.readVarint(); cmd = cmdLen & 0x7; length = cmdLen >> 3; + if (!length) {break;} } length--;