From 02287a23f0e71b1d524c853adc0ea24671522da2 Mon Sep 17 00:00:00 2001 From: stanley lieber Date: Fri, 23 Sep 2011 01:36:44 -0500 Subject: mothra: do not crash on an invalid j command --- sys/src/cmd/mothra/mothra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/mothra/mothra.c b/sys/src/cmd/mothra/mothra.c index dc2ef56ce..6d1f01558 100644 --- a/sys/src/cmd/mothra/mothra.c +++ b/sys/src/cmd/mothra/mothra.c @@ -541,7 +541,7 @@ void docmd(Panel *p, char *s){ break; case 'j': s=arg(s); - if(*s) + if(atoi(s) <= nwww()) geturl(www(atoi(s)-1)->url->fullname, GET, 0, 0, 0); else message("no url selected"); -- cgit v1.2.3