Skip to content

Commit

Permalink
fix: increase the range of disabled keys
Browse files Browse the repository at this point in the history
close #68
  • Loading branch information
chenjunbiao committed Apr 27, 2021
1 parent ee2995f commit 51a43d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/utils/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ func KeyOf(hexStr string) byte {

// ForbidUserKey forbid user set that key
func ForbidUserKey(key byte) bool {
switch key {
case 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f:
if (key >= 0x01 && key <= 0x0f) || key >= 0x40 {
return true
}

return false
}

Expand Down

0 comments on commit 51a43d3

Please sign in to comment.