From: Mark Wooding Date: Sat, 27 Dec 2008 14:26:02 +0000 (+0000) Subject: sym-gtest: Don't include empty words. X-Git-Tag: 2.0.6~1 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/bb1cbbe82a40a9cffb8d143bed2e3aa245595450 sym-gtest: Don't include empty words. An empty word in a command like `set LABEL' provokes a segfault from sym-test -- not entirely unreasonably considering that sym-test is a quick lash-up and not intended to be robust against bogus test scripts. So filter them out in advance. --- diff --git a/sym-gtest b/sym-gtest index 3dd6ed6..ac5bcaf 100755 --- a/sym-gtest +++ b/sym-gtest @@ -18,7 +18,7 @@ sub random ($) { $words = "/usr/dict/words"; -r $words or $words = "/usr/share/dict/words"; open(DICT, $words) or die("open($words): $!"); -@w = ; +@w = grep /./, ; chomp(@w); close(DICT);