X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=tag.c;h=e8ebd8e92c6d7796cd9ee273ec448352a4e5da85;hb=7e59c89250c82ce45c2a3bea35b64689f9749746;hp=609ce9c2509b695673bc908eb6be630c85e534a5;hpb=c53d9d516a871661414ff8110cd3c17c3dc525ec;p=dwm.git diff --git a/tag.c b/tag.c index 609ce9c..e8ebd8e 100644 --- a/tag.c +++ b/tag.c @@ -114,7 +114,8 @@ tag(Arg *arg) { return; for(i = 0; i < ntags; i++) sel->tags[i] = (arg->i == -1) ? True : False; - sel->tags[arg->i] = True; + if(arg->i >= 0 && arg->i < ntags) + sel->tags[arg->i] = True; arrange(); }