Our algorithm no longer causes exceptions, but it's wrong
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 22 May 2008 01:36:23 +0000 (21:36 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 22 May 2008 01:36:23 +0000 (21:36 -0400)
* Source/AppController.m
(-[findWords:])

Source/AppController.m

index 35c0850e446b90de8f2a6483b315afe003e362ba..bf8b27564a6a661fe3b4ad0fa3774588ebc485c9 100644 (file)
@@ -70,7 +70,7 @@
                }
                
                BOOL add = YES;
-               for (int j = 0, k = numWild; j < length; j++, k++)
+               for (int j = 0, k = numWild; k < length; j++, k++)
                {
                        if ([[word alphagram] characterAtIndex:j] != [tiles characterAtIndex:k])
                        {
@@ -89,7 +89,7 @@
                
                if (add)
                {
-                       [wordlist addObject:[word word]];
+                       [wordlist addObject:word];
                }
                add = YES;
        }