a more robust console.pl idle loop fix
[spider.git] / perl / console.pl
index f7b0d5f4690e7b7edbefb6d3335bc540cd24d9c0..d01cd5390e8a88af39b8324dfe67c76ecd66a999 100755 (executable)
@@ -518,10 +518,10 @@ sub idle_loop
        }
        my $ch = $bot->getch();         # this is here just to catch RESIZE events
        if (defined $ch) {
-               if ($ch == KEY_RESIZE) {
+               if ($ch eq KEY_RESIZE) {
                        doresize();
                } else {
-                       rec_stdin($ch) unless $ch == '-1';
+                       rec_stdin($ch) unless $ch eq '-1';
                }
        }
        $top->refresh() if $top->is_wintouched;