diff --git a/gradle.properties b/gradle.properties index f0830cd..30fcabd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ kotlin.code.style=official specifyKotlinAsDependency=false projectGroup=ru.dbotthepony.kommons -projectVersion=2.1.6 +projectVersion=2.1.7 guavaDepVersion=33.0.0 gsonDepVersion=2.8.9 diff --git a/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt b/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt index b6cea04..b7dbb14 100644 --- a/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt +++ b/src/main/kotlin/ru/dbotthepony/kommons/io/OutputStreamUtils.kt @@ -109,7 +109,7 @@ private fun Int.toSignedVar(): Int { if (this >= 0) return this shl 1 else - return (this shl 1) or 1 + return ((-this - 1) shl 1) or 1 } private fun Long.toSignedVar(): Long {