fix(settings): system ID max value

This commit is contained in:
Quentin McGaw
2022-01-06 16:48:06 +00:00
parent 6132cd9df2
commit ab39edc692
3 changed files with 75 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ func (r *Reader) readID(key, retroKey string) (
if err != nil {
return nil, fmt.Errorf("environment variable %s: %w: %s: %s",
idEnvKey, ErrSystemIDNotValid, idString, err)
} else if idInt < 0 || idInt > 2^16 {
} else if idInt < 0 || idInt > 65535 {
return nil, fmt.Errorf("environment variable %s: %w: %d: must be between 0 and 65535",
idEnvKey, ErrSystemIDNotValid, idInt)
}