Closed franklevasseur closed 4 years ago
Apologies for the delay. I just looked at your patch, and yes - I can see the bug. Instead of having two duplicate returns, I think moving the level set call (line 165) inside the if block (between line 160 and 161) will simplify this patch while achieving the same effect.
If you have a testcase that lets me repro (I'm guessing this happened on a low memory environment) I'll try my version and see if the achieves the same effect.
Thank you very much for sending this PR. I've just merged.
The code is pretty much self explanatory!
returning variable
crf1dt
here prevent from linecrf1dt->level = LEVEL_NONE;
to be executed on a NULL ptr...Error will be easier to debug for everybody using your lib. I had to debug for at least an hour with
printf
's to understand where the error came from... (I had no stack trace at all)feel free to message me if you have any questions!
Good job for this library, it's really usefull.
François