Skip to content

Commit 6fc9ba6

Browse files
committed
Removed trailing zero from mp_fwrite output
1 parent 96f9edf commit 6fc9ba6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mp_fwrite.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ mp_err mp_fwrite(const mp_int *a, int radix, FILE *stream)
2020
}
2121

2222
if ((err = mp_to_radix(a, buf, size, &written, radix)) == MP_OKAY) {
23+
written--;
2324
if (fwrite(buf, written, 1uL, stream) != 1uL) {
2425
err = MP_ERR;
2526
}

0 commit comments

Comments
 (0)