Skip to content

Commit

Permalink
Use readWriteVarUint16
Browse files Browse the repository at this point in the history
Co-authored-by: Shawn Yang <[email protected]>
  • Loading branch information
wywen and chaokunyang authored Oct 16, 2024
1 parent 5c92e80 commit 8538e3e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class UShortSerializer(
true
) {
override fun write(buffer: MemoryBuffer, value: UShort) {
buffer.writeVarUint32(value.toInt())
buffer.writeVarUint16(value.toInt())
}
override fun read(buffer: MemoryBuffer): UShort {
return buffer.readVarUint32().toUShort()
return buffer.readVarUint16().toUShort()
}
}

Expand Down

0 comments on commit 8538e3e

Please sign in to comment.