Skip to content

Commit 35da645

Browse files
committed
Fix trailing null bytes in JSON output files
1 parent c406996 commit 35da645

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/prover.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ groth16_prover_prove(
364364
stringPublic.length(), public_size,
365365
"Required");
366366

367+
*proof_size = stringProof.length();
368+
*public_size = stringPublic.length();
369+
367370
std::strncpy(proof_buffer, stringProof.c_str(), *proof_size);
368371
std::strncpy(public_buffer, stringPublic.c_str(), *public_size);
369372

0 commit comments

Comments
 (0)