diff options
author | David Phillips <david@sighup.nz> | 2018-09-11 22:15:11 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-09-11 22:15:14 +1200 |
commit | 4844410de55d3fea2da86b3c7ea9b2fa687b4838 (patch) | |
tree | 6e83fb412b7e31003deb871ae8878b91cf95d28b | |
parent | 7dc57285d61f74870ab7d423c790dc1d01f7a23b (diff) | |
download | idalius-4844410de55d3fea2da86b3c7ea9b2fa687b4838.tar.xz |
Map: Add check for trailing garbage
-rw-r--r-- | Plugin/Map.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Plugin/Map.pm b/Plugin/Map.pm index 25d100d..fb37e64 100644 --- a/Plugin/Map.pm +++ b/Plugin/Map.pm @@ -57,6 +57,10 @@ sub parse_list { return ("Error: expected ], got end of line", undef) unless $nest == 0; + if ($i != length($input)) { + return ("Error: unexpected item in the bagging area (after ']')", undef); + } + return (undef, @res); } |