Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2901

Programming • Re: [C][GMP] What are these trash data written on files ?

$
0
0
if rop is NULL then a result array of the necessary size is allocated using the current GMP allocation function
Then the problem is fwrite(buf == NULL, bytes_written > 0) and it should be "buf = mpz_export()"

Code:

  free(buf);  buf = NULL;  size_t bytes_written = 0;   buf = mpz_export(buf, &bytes_written, 1, (size_t)1u, 0, 0, y);  ⋮  w = fwrite(buf, bytes_written, 1, fw); 

Statistics: Posted by blackbird — 2025-01-01 15:51



Viewing all articles
Browse latest Browse all 2901

Trending Articles