From 24191aafe4058c8cad9f9ded16c182366d4c0e78 Mon Sep 17 00:00:00 2001 From: dms Date: Mon, 1 Oct 2001 13:05:50 +0000 Subject: [PATCH] - should fix "dict 1 shit". fixed by lear git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@515 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Modules/Dict.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blootbot/src/Modules/Dict.pl b/blootbot/src/Modules/Dict.pl index a32d93e..3212b62 100644 --- a/blootbot/src/Modules/Dict.pl +++ b/blootbot/src/Modules/Dict.pl @@ -57,7 +57,7 @@ sub Dict { my $total = scalar @results; - if (defined $num and ($num > $total or $num < 0)) { + if (defined $num and ($num > $total or $num < 1)) { &msg($::who, "error: choice in definition is out of range."); return; } @@ -65,7 +65,7 @@ sub Dict { # parse the results. if ($total > 1) { if (defined $num) { - $retval = sprintf("[%d/%d] %s", $num, $total, $results[$num]); + $retval = sprintf("[%d/%d] %s", $num, $total, $results[$num-1]); } else { # suggested by larne and others. my $prefix = "Dictionary '$query' "; -- 2.39.5