From 97e7d91e9cd220698b49667a5352b0967e42ed09 Mon Sep 17 00:00:00 2001 From: rnentjes Date: Tue, 17 Dec 2024 20:45:00 +0100 Subject: [PATCH] Fix incorrect size computation in SlicedByteArray. Corrected the `size` property to return the full `length` instead of subtracting the offset. Updated the project version to 0.2.9 to reflect this fix. --- build.gradle.kts | 2 +- src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7fccb65..fc4164d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "nl.astraeus" -version = "0.2.8" +version = "0.2.9" repositories { mavenCentral() diff --git a/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt b/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt index 115c381..13cfdcc 100644 --- a/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt +++ b/src/commonMain/kotlin/nl/astraeus/tba/SlicedByteArray.kt @@ -6,7 +6,7 @@ class SlicedByteArray( val length: Int ) { val size: Int - get() = length - offset + get() = length constructor(array: ByteArray) : this(array, 0, array.size)