mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
added length check for args in terminal thread command
This commit is contained in:
@ -147,6 +147,9 @@ func threads(client service.Client, args ...string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func thread(client service.Client, args ...string) error {
|
func thread(client service.Client, args ...string) error {
|
||||||
|
if len(args) == 0 {
|
||||||
|
return fmt.Errorf("you must specify a thread")
|
||||||
|
}
|
||||||
tid, err := strconv.Atoi(args[0])
|
tid, err := strconv.Atoi(args[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user