From 8abf095265341f1db12abb1497b5c92b683c6890 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 29 Dec 2012 03:18:34 -0600 Subject: Ashwini Sharma pointed out that my previous tweak to [!abc] groups still didn't get the error reporting right (test case "touch -d 12 -r f2 f1"). This says "no 'r' with 'd'" for that, and still shouldn't be able to fall off the end of the list (segfault) because an option can't conflict with itself (that's what the ~(1<opts; opt == bad || !(gof->excludes & i); bad = bad->next) - i<<=1; + for (bad=gof->opts, i=1; ;bad = bad->next, i<<=1) { + if (opt == bad || !(i & toys.optflags)) continue; + if (toys.optflags & bad->dex[2]) break; + } error_exit("No '%c' with '%c'", opt->c, bad->c); } -- cgit v1.2.3