[F] Try to fix wacca uint overflow

This commit is contained in:
Azalea
2024-04-20 09:37:34 +09:00
parent 8e882aafa1
commit 4215b39539
2 changed files with 3 additions and 3 deletions

View File

@@ -134,6 +134,7 @@ fun Any.long() = when (this) {
is String -> toLong()
else -> 400 - "Invalid number: $this"
}
fun Any.uint32() = long() and 0xFFFFFFFF
fun Any.int() = long().toInt()
operator fun Bool.unaryPlus() = if (this) 1 else 0