Skip to content

Commit

Permalink
fix first suffix char non-ascii check
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Tosca committed May 18, 2024
1 parent 78516e4 commit 8011c77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {

group = "earth.adi"

version = "0.0.4"
version = "0.0.5"

repositories { mavenCentral() }

Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/earth/adi/typeid/codec/Codec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ object Codec {
return ValidatedSuffix(false, "Suffix with illegal length, must be $SUFFIX_LENGTH")
}

val startCode = input[start].code
if (startCode >= SUFFIX_LOOKUP.size || ((SUFFIX_LOOKUP[startCode] ushr 3) and 0x3L) > 0) {
val startCode = input[start]
if (startCode < '0' || startCode > '7') {
return ValidatedSuffix(false, "Illegal leftmost suffix character, must be one of [01234567]")
}

Expand Down

0 comments on commit 8011c77

Please sign in to comment.