Skip to content

Commit

Permalink
Correcting a bug when 100% unknown words are passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardcastro committed Sep 19, 2015
1 parent 81f81f0 commit 6efac62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ServerSide/Hinantin/cgi-bin/spellcheck31/script/ssrv.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ elsif ($cmd eq "check_spelling") {
if (not $correct) { # the word is misspelled
$object->AddIncorrectEntry($word);
my $suggestions = $object->getSuggestions($word);
$suggestions = "[$suggestions]";
if ($suggestions =~ /\?\?\?/)
{
$suggestions = "[\"???\"]";
}
else {
$suggestions = "[$suggestions]";
}
my $ud = "false";
$result = $result . "{ \"word\": \"$word\", \"ud\": \"$ud\", \"suggestions\": $suggestions}," ;
}
Expand Down

0 comments on commit 6efac62

Please sign in to comment.