Skip to content

Commit 4effb72

Browse files
committed
Update encoder.ts
1 parent c009cd8 commit 4effb72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/pinus-protobuf/lib/encoder.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ export class Encoder {
112112

113113
switch (type) {
114114
case 'uInt32':
115+
case 'uInt64':
115116
offset = this.writeBytes(buffer, offset, codec.encodeUInt32(value));
116117
break;
117118
case 'int32':
118119
case 'sInt32':
120+
case 'sInt64':
119121
offset = this.writeBytes(buffer, offset, codec.encodeSInt32(value));
120122
break;
121123
case 'float':
@@ -248,4 +250,4 @@ export class Encoder {
248250

249251
return codec.encodeUInt32((tag << 3) | value);
250252
}
251-
}
253+
}

0 commit comments

Comments
 (0)