Skip to content

Commit

Permalink
fix(pkg/strvals): use rune literal instead of ASCII
Browse files Browse the repository at this point in the history
When checking that a value begins with zero use a rune literal instead of the
ASCII code for zero.
  • Loading branch information
rbwsam committed Jul 27, 2017
1 parent 609e72b commit a5dc546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/strvals/parser.go
Expand Up @@ -309,7 +309,7 @@ func typedVal(v []rune) interface{} {
}

// If this value does not start with zero, try parsing it to an int
if len(val) != 0 && val[0] != 48 {
if len(val) != 0 && val[0] != '0' {
if iv, err := strconv.ParseInt(val, 10, 64); err == nil {
return iv
}
Expand Down

0 comments on commit a5dc546

Please sign in to comment.