Skip to content

Commit

Permalink
fix: test if filed is long for array bigint input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
8de2fdb0 authored Oct 4, 2023
1 parent 218ed41 commit 91d4cbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ function generateEncode(ctx: Context, fullName: string, messageDesc: DescriptorP
writer.ldelim();
`;

if (options.forceLong === LongOption.BIGINT) {
if (isLong(field) && options.forceLong === LongOption.BIGINT) {
const fieldType = toReaderCall(field);
switch (fieldType) {
case 'int64': case 'sint64': case 'sfixed64':
Expand Down

0 comments on commit 91d4cbe

Please sign in to comment.