Skip to content

Commit

Permalink
Update decoder.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
whtiehack committed Oct 17, 2024
1 parent 4effb72 commit aecbf99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/pinus-protobuf/lib/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ export class Decoder {
decodeProp(type: string, protos?: { [key: string]: any }) {
switch (type) {
case 'uInt32':
case 'uInt64':
return codec.decodeUInt32(this.getBytes());
case 'int32':
case 'sInt32':
case 'sInt64':
return codec.decodeSInt32(this.getBytes());
case 'float':
let float = this.buffer.readFloatLE(this.offset);
Expand Down Expand Up @@ -201,4 +203,4 @@ export class Decoder {
peekBytes() {
return this.getBytes(true);
}
}
}

0 comments on commit aecbf99

Please sign in to comment.