From 71e28b9adcd5fbd74d9cf499e01078bf9d86d8a0 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 24 May 2024 04:24:55 -0400 Subject: unprotbas: stricter option checking. --- unprotbas.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'unprotbas.c') diff --git a/unprotbas.c b/unprotbas.c index a95e9a6..14fdc63 100644 --- a/unprotbas.c +++ b/unprotbas.c @@ -697,6 +697,10 @@ void parse_args(int argc, char **argv) { if(keepvars && forcevars) die("-f and -n are mutually exclusive"); if(readmap && writemap) die("-r and -w are mutually exclusive"); if(readmap && keepvars) die("-r and -n are mutually exclusive (maybe you want -w?)"); + if(protect_code || protect_vars) { + if(checkonly || keepvars || forcevars || readmap || writemap || !keepgarbage) + die("-p, -pc, -pv options can't be combined with other options except -v"); + } } int main(int argc, char **argv) { -- cgit v1.2.3