Allow nil conversion handlers in btcctl.

This commit is contained in:
Dave Collins 2013-10-21 23:03:11 -05:00
parent 2ea4239f5e
commit 4e5cd1a326

View file

@ -159,13 +159,15 @@ func commandHandler(cfg *config, command string, data *handlerData, args []strin
iargs[i] = arg
}
for i := range iargs {
converter := convHandlers[i]
if converter != nil {
convertedArg, err := converter(args[i])
if err != nil {
return err
if convHandlers != nil {
converter := convHandlers[i]
if converter != nil {
convertedArg, err := converter(args[i])
if err != nil {
return err
}
iargs[i] = convertedArg
}
iargs[i] = convertedArg
}
}