From 712f15d9bf34bf993cb3a3facc74bc15329c6c6c Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Mon, 27 May 1996 01:04:20 +0000 Subject: Make xroach not seg fault on missing numeric args. Fixes PR bin/1254. Submitted by: John Capo --- games/xroach/files/patch-ab | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 games/xroach/files/patch-ab (limited to 'games/xroach/files/patch-ab') diff --git a/games/xroach/files/patch-ab b/games/xroach/files/patch-ab new file mode 100644 index 000000000000..f2f0774e18e1 --- /dev/null +++ b/games/xroach/files/patch-ab @@ -0,0 +1,47 @@ +*** xroach.c.orig Sat May 4 21:18:41 1996 +--- xroach.c Sat May 4 17:50:29 1996 +*************** +*** 96,114 **** + /* + Process command line options. + */ +! for (ax=1; ax= ac) +! Usage(); +! + if (strcmp(arg, "-display") == 0) { +! display_name = av[ax++]; + } + else if (strcmp(arg, "-rc") == 0) { +! roachColor = av[ax++]; + } + else if (strcmp(arg, "-speed") == 0) { +! roachSpeed = atof(av[ax++]); + } + else if (strcmp(arg, "-roaches") == 0) { +! maxRoaches = strtol(av[ax++], (char **)NULL, 0); + } + else { + Usage(); -- cgit v1.2.3