aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-25 16:21:44 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-25 16:21:44 -0400
commit69786b846ff2e0afc8bbf5b699b7ead925d90129 (patch)
tree81d2ad594e9041f0a9c75cd2b6781fdde69172e9
parent93d9b2657514a1c198234e610de9a6483ab9f74f (diff)
downloadbw-atari8-tools-69786b846ff2e0afc8bbf5b699b7ead925d90129.tar.gz
xexamine: don't accept -s 0.
-rw-r--r--xexamine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xexamine.c b/xexamine.c
index 6a04237..94374b3 100644
--- a/xexamine.c
+++ b/xexamine.c
@@ -318,6 +318,10 @@ int main(int argc, char **argv) {
case 's':
if( (only_segment = get_address(SELF, optarg)) < 0 )
exit(1);
+ if(!only_segment) {
+ fprintf(stderr, SELF ": 0 is not a valid segment number (they start with 1).\n");
+ exit(1);
+ }
break;
case 'v':
xex_verbose = 1;