]> git.donarmstrong.com Git - infobot.git/commitdiff
don't die on words like 'seen'
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 28 Feb 2005 23:50:24 +0000 (23:50 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 28 Feb 2005 23:50:24 +0000 (23:50 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1194 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/scramble.pl

index de652bb6798e3fbc4ef3f1ecb9948d8f043b7d4f..fbe91c500810cf94881c55fdeb690cbcc545462d 100644 (file)
@@ -41,13 +41,12 @@ sub scramble
       {
        # non-random shuffle, but good enough
        ($new_middle = $middle) =~ s/(.)(.)/$2$1/g;
-       last;
       }
 
       # shuffle the middle letters
       $new_middle = join "", List::Util::shuffle(split //, $middle);
     }
-    while ($middle eq $new_middle);
+    while (($cnt < 10) && ($middle eq $new_middle));
 
     # add the word to the list...
     $scrambled .= "$first$new_middle$last ";