From: Ian Jackson Date: Mon, 21 Sep 2009 17:04:51 +0000 (+0100) Subject: Properly reject capacity strings which start with a commodity X-Git-Tag: 5.0^2~110 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=commitdiff_plain;h=ca34a4bd396774ba8d98df14eb4bba753202d981;ds=sidebyside Properly reject capacity strings which start with a commodity --- diff --git a/yarrg/web/check_capacitystring b/yarrg/web/check_capacitystring index 3c77972..a79b6f1 100644 --- a/yarrg/web/check_capacitystring +++ b/yarrg/web/check_capacitystring @@ -88,6 +88,9 @@ my $parse_values= sub { elsif (s/^( $iqtyrex ) \s* ([a-z ]+) \s+ //xo) { my ($qty,$spec) = ($1,$2); $debugf->("VALUE COMMOD $qty '$spec'"); + expected_error("Capacity specification must start with". + " ship size or amount with units") + if $first_term; $commodsth ||= $dbh->prepare("SELECT commodname,unitmass,unitvolume FROM commods WHERE commodname LIKE ?");