Skip to content

Commit

Permalink
Fix byte order in Unsafe.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
PhoenixmitX committed Nov 27, 2024
1 parent 19d5839 commit a4f65be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ object Unsafe:
def setOctaByteBigEndian(byteArray: Array[Byte], ix: Int, value: Long): Unit =
_setOctaByteBigEndian(byteArray, ix, JLong.reverseBytes(value))

final class BigEndianByteArrayAccess extends UnsafeByteArrayAccess(ByteOrder.LITTLE_ENDIAN):
final class BigEndianByteArrayAccess extends UnsafeByteArrayAccess(ByteOrder.BIG_ENDIAN):

def doubleByteBigEndian(byteArray: Array[Byte], ix: Int): Char =
_doubleByteBigEndian(byteArray, ix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ object Unsafe:
def setOctaByteBigEndian(byteArray: Array[Byte], ix: Int, value: Long): Unit =
_setOctaByteBigEndian(byteArray, ix, JLong.reverseBytes(value))

final class BigEndianByteArrayAccess extends UnsafeByteArrayAccess(ByteOrder.LITTLE_ENDIAN):
final class BigEndianByteArrayAccess extends UnsafeByteArrayAccess(ByteOrder.BIG_ENDIAN):

def doubleByteBigEndian(byteArray: Array[Byte], ix: Int): Char =
_doubleByteBigEndian(byteArray, ix)
Expand Down

0 comments on commit a4f65be

Please sign in to comment.