diff options
author | denis <denis@cvs.openbsd.org> | 2018-03-05 10:53:38 +0000 |
---|---|---|
committer | denis <denis@cvs.openbsd.org> | 2018-03-05 10:53:38 +0000 |
commit | b7f472d2377f409cf80224494225af4f9f797cbd (patch) | |
tree | 5dd97592f4040fbfc61b5628187e6417bb570069 /usr.bin | |
parent | aff12b88b03bf032063ea76e25d8f61594b2f5c5 (diff) |
Fix failure when AS number is < 10
Thanks to Pierre Emeriaud for reporting & testing.
OK benno@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/bgplg/bgplg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/bgplg/bgplg.c b/usr.bin/bgplg/bgplg.c index acd5cf87380..fc825bc5bf5 100644 --- a/usr.bin/bgplg/bgplg.c +++ b/usr.bin/bgplg/bgplg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgplg.c,v 1.18 2017/12/18 09:12:49 job Exp $ */ +/* $OpenBSD: bgplg.c,v 1.19 2018/03/05 10:53:37 denis Exp $ */ /* * Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org> @@ -160,7 +160,7 @@ lg_arg2argv(char *arg, int *argc) len = strlen(arg); /* Count elements */ - for (i = 0; i < (len - 1); i++) { + for (i = 0; i < len; i++) { if (isspace((unsigned char)arg[i])) { /* filter out additional options */ if (arg[i + 1] == '-') { @@ -182,7 +182,7 @@ lg_arg2argv(char *arg, int *argc) *argc = c; /* Fill array */ - for (i = c = 0; i < (len - 1); i++) { + for (i = c = 0; i < len; i++) { if (arg[i] == '\0' || i == 0) { if (i != 0) ptr = &arg[i + 1]; |