mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +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 {
|
||||
if len(args) == 0 {
|
||||
return fmt.Errorf("you must specify a thread")
|
||||
}
|
||||
tid, err := strconv.Atoi(args[0])
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user