From f2eb3e869eb31675d5f1dcc0fd8e1e626aef1ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Tue, 27 Dec 2016 21:47:16 +0100 Subject: [PATCH] Fixed the file issue... but the export issue still remains -_- I hate seg faults. --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index be5079c..67ff55e 100644 --- a/src/main.c +++ b/src/main.c @@ -132,7 +132,11 @@ int main(int argc, char *argv[]) { exitCode = 1; goto releaseMemory; } - mpz_set(num, primes.list[primes.end]); + /** + * Yes, I realize there's a -1 here, I don't know why but it won't + * work if it's not there, so don't change it unless necessary. + */ + mpz_set(num, primes.list[primes.end-1]); } if(efile != NULL) {