diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2014-04-09 01:57:03 -0400 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2014-04-09 01:57:03 -0400 |
commit | 794197adb16da0f7644cc8b56830316682b89011 (patch) | |
tree | 8138357a32582c6d966ff48ddf3e0f7ae4136edf /rc | |
parent | ea3c192bb5a4abd48f895fb48e6c318c233cc16f (diff) |
newt: improve input filtering
Diffstat (limited to 'rc')
-rwxr-xr-x | rc/bin/newt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rc/bin/newt b/rc/bin/newt index 32e0b51b7..7d6e8ab8e 100755 --- a/rc/bin/newt +++ b/rc/bin/newt @@ -154,8 +154,10 @@ while(){ cmd=`{read} switch($cmd){ case [0-9]* - post=$cmd(1) - printp $post + if(grep -s -e '^[0-9]+$' <{echo $cmd(1)}){ + post=$cmd(1) + printp $post + } case b if(! ~ $post $posts(1)){ post=`{echo $post^-1 | bc} |