mirror of
https://github.com/golang/go
synced 2024-11-26 17:56:55 -07:00
cmd/5a, cmd/6a, cmd/8a: fix flag parsing
go tool 6a -$(unicode fffd) was crashing. Fixes #5878. R=ken2 CC=golang-dev https://golang.org/cl/11208045
This commit is contained in:
parent
0ce56e60b8
commit
8124a02cb2
@ -68,7 +68,7 @@ main(int argc, char *argv[])
|
|||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
default:
|
default:
|
||||||
c = ARGC();
|
c = ARGC();
|
||||||
if(c >= 0 || c < sizeof(debug))
|
if(c >= 0 && c < sizeof(debug))
|
||||||
debug[c] = 1;
|
debug[c] = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ main(int argc, char *argv[])
|
|||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
default:
|
default:
|
||||||
c = ARGC();
|
c = ARGC();
|
||||||
if(c >= 0 || c < sizeof(debug))
|
if(c >= 0 && c < sizeof(debug))
|
||||||
debug[c] = 1;
|
debug[c] = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ main(int argc, char *argv[])
|
|||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
default:
|
default:
|
||||||
c = ARGC();
|
c = ARGC();
|
||||||
if(c >= 0 || c < sizeof(debug))
|
if(c >= 0 && c < sizeof(debug))
|
||||||
debug[c] = 1;
|
debug[c] = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user