Skip to content

Commit

Permalink
Merge pull request #68 from tdakkota/fix/bool-bitmask
Browse files Browse the repository at this point in the history
fix: use correct bitmask to check `false` value
  • Loading branch information
tdakkota committed Jan 16, 2023
2 parents a044307 + a31813d commit 2f8261b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dec_bool.go
Expand Up @@ -29,8 +29,8 @@ func (d *Decoder) Bool() (bool, error) {
const encodedTrue = 't' | 'r'<<8 | 'u'<<16 | 'e'<<24
return false, findInvalidToken4(buf, encodedTrue)
case 'f':
const encodedAlse = 'a' | 'l'<<8 | 's'<<16 | 'e'<<24
return false, findInvalidToken4(buf, encodedAlse)
const encodedFals = 'f' | 'a'<<8 | 'l'<<16 | 's'<<24
return false, findInvalidToken4(buf, encodedFals)
default:
return false, badToken(c)
}
Expand Down

0 comments on commit 2f8261b

Please sign in to comment.