aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Map.pm
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-09-11 22:15:11 +1200
committerDavid Phillips <david@sighup.nz>2018-09-11 22:15:14 +1200
commit4844410de55d3fea2da86b3c7ea9b2fa687b4838 (patch)
tree6e83fb412b7e31003deb871ae8878b91cf95d28b /Plugin/Map.pm
parent7dc57285d61f74870ab7d423c790dc1d01f7a23b (diff)
downloadidalius-4844410de55d3fea2da86b3c7ea9b2fa687b4838.tar.xz
Map: Add check for trailing garbage
Diffstat (limited to 'Plugin/Map.pm')
-rw-r--r--Plugin/Map.pm4
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);
}