add missing empty string test, pointed out by davec

This commit is contained in:
Marco Peereboom 2013-09-17 17:46:03 -04:00
parent ada49f1413
commit 68f30c7367

View file

@ -285,6 +285,7 @@ func loadConfig() (*config, []string, error) {
}
// Validate profile port number
if cfg.Profile != "" {
profilePort, err := strconv.Atoi(cfg.Profile)
if err != nil || profilePort < 1024 || profilePort > 65535 {
str := "%s: The profile port must be between 1024 and 65535"
@ -293,6 +294,7 @@ func loadConfig() (*config, []string, error) {
parser.WriteHelp(os.Stderr)
return nil, nil, err
}
}
// Append the network type to the data directory so it is "namespaced"
// per network. In addition to the block database, there are other