mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 12:01:35 +08:00
Guard against insufficient args to print cmd
This commit is contained in:
@ -159,6 +159,10 @@ func breakpoint(p *proctl.DebuggedProcess, args ...string) error {
|
||||
}
|
||||
|
||||
func printVar(p *proctl.DebuggedProcess, args ...string) error {
|
||||
if len(args) == 0 {
|
||||
return fmt.Errorf("Not enough arguments to print command")
|
||||
}
|
||||
|
||||
val, err := p.EvalSymbol(args[0])
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user