diff options
author | asami <asami@FreeBSD.org> | 1996-05-27 09:04:20 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1996-05-27 09:04:20 +0800 |
commit | 828cbd58126b7db4ff5a3a71e8ba4e7585cd389d (patch) | |
tree | fbac62a7ba6610d4d20d6d080a3eb72a5086a11b /games/xroach | |
parent | efb54cc75bbefb58ad2da1b7f6be9418bff50fee (diff) | |
download | freebsd-ports-gnome-828cbd58126b7db4ff5a3a71e8ba4e7585cd389d.tar.gz freebsd-ports-gnome-828cbd58126b7db4ff5a3a71e8ba4e7585cd389d.tar.zst freebsd-ports-gnome-828cbd58126b7db4ff5a3a71e8ba4e7585cd389d.zip |
Make xroach not seg fault on missing numeric args. Fixes PR bin/1254.
Submitted by: John Capo <jc@irbs.com>
Diffstat (limited to 'games/xroach')
-rw-r--r-- | games/xroach/files/patch-ab | 47 |
1 files changed, 47 insertions, 0 deletions
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; ax++) { +! arg = av[ax]; + 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(); +--- 96,118 ---- + /* + Process command line options. + */ +! for (ax=1; ax<ac; ) { +! arg = av[ax++]; +! +! if (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(); |