X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/903213e63fd6c409046f66e73881aba33c3926de..6b82ef44b07d19cd17dad3c26fe0a05715ffcb03:/IkiWiki/Plugin/img.pm

diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index 66cc08530..7b89ab673 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -65,9 +65,10 @@ sub preprocess (@) { #{{{
 	my $r;
 
 	if ($params{size} ne 'full') {
-		my ($w, $h) = ($params{size} =~ /^(\d+)x(\d+)$/);
+		my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/);
 		error sprintf(gettext('bad size "%s"'), $params{size})
-			unless (defined $w && defined $h);
+			unless (defined $w && defined $h &&
+			        (length $w || length $h));
 
 		my $outfile = "$config{destdir}/$dir/${w}x${h}-$base";
 		$imglink = "$dir/${w}x${h}-$base";