summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Clark <jon.h.clark@gmail.com>2011-03-14 17:03:51 -0400
committerJonathan Clark <jon.h.clark@gmail.com>2011-03-14 17:03:51 -0400
commitdccf47501f078a354375b9f3edd481d8c8d30268 (patch)
tree024d4589eca97433e342fc8bb463f3c467d219bb
parenteda8d83cd957463d32980da7c60085a820f7eae0 (diff)
more paranoid checking when (idiot/time-crunched) user tries to define his own <seg> tags during tuning
-rwxr-xr-xvest/dist-vest.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/vest/dist-vest.pl b/vest/dist-vest.pl
index f95754dc..d17d7de1 100755
--- a/vest/dist-vest.pl
+++ b/vest/dist-vest.pl
@@ -573,7 +573,11 @@ sub enseg {
while (my $line=<SRC>){
chomp $line;
if ($line =~ /^\s*<seg/i) {
+ if($line =~ /id="[0-9]+"/) {
print NEWSRC "$line\n";
+ } else {
+ die "When using segments with pre-generated <seg> tags, you must include a zero-based id attribute";
+ }
} else {
print NEWSRC "<seg id=\"$i\">$line</seg>\n";
}