aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;