From ac2e922067be306a89cd10419263cade54b2f60f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 17 May 2014 18:01:26 +0200 Subject: fix segfault with EDI --- src/ReedSolomon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ReedSolomon.cpp') diff --git a/src/ReedSolomon.cpp b/src/ReedSolomon.cpp index 0989e17..5239a8f 100644 --- a/src/ReedSolomon.cpp +++ b/src/ReedSolomon.cpp @@ -20,6 +20,7 @@ */ #include "ReedSolomon.h" +#include #include // For galois.h ... #include // For memcpy @@ -46,8 +47,7 @@ ReedSolomon::ReedSolomon(int N, int K, bool reverse, int gfpoly, int firstRoot, rsData = init_rs_char(symsize, gfpoly, firstRoot, primElem, nroots, pad); if (rsData == NULL) { - fprintf(stderr, "ERROR: Invalid Reed Solomon parameters!\n"); - abort(); + throw std::invalid_argument("Invalid Reed-Solomon parameters!"); } } -- cgit v1.2.3