mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
fix panic when config value set 0 (#1723)
This commit is contained in:
@ -123,6 +123,9 @@ func configureSet(t *Term, args string) error {
|
||||
if err != nil {
|
||||
return reflect.ValueOf(nil), fmt.Errorf("argument to %q must be a number", cfgname)
|
||||
}
|
||||
if n < 0 {
|
||||
return reflect.ValueOf(nil), fmt.Errorf("argument to %q must be a number greater than zero", cfgname)
|
||||
}
|
||||
return reflect.ValueOf(&n), nil
|
||||
case reflect.Bool:
|
||||
v := rest == "true"
|
||||
|
||||
Reference in New Issue
Block a user