Skip to content

Commit eb041f7

Browse files
authored
fix: do not cast numbers to bool (#45)
1 parent b6b35ef commit eb041f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/json.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ impl<let NumBytes: u32, let NumPackedFields: u32, let MaxNumTokens: u32, let Max
421421

422422
raw_transcript[transcript_ptr] = new_entry;
423423
length = length * (1 - push_transcript) + increase_length;
424-
transcript_ptr += (push_transcript as bool) as u32;
424+
transcript_ptr += (push_transcript != 0) as u32;
425425

426426
previous_was_potential_escape_sequence = is_potential_escape_sequence;
427427

@@ -564,7 +564,7 @@ impl<let NumBytes: u32, let NumPackedFields: u32, let MaxNumTokens: u32, let Max
564564
"capture_missing_tokens: MaxNumTokens limit exceeded!",
565565
);
566566
updated_transcript[transcript_ptr] = new_transcript;
567-
transcript_ptr += update as bool as u32;
567+
transcript_ptr += (update != 0) as u32;
568568
}
569569
updated_transcript
570570
}

0 commit comments

Comments
 (0)