We were wrongly checking end of the input buffer to see if a filter was a regex, instead of the end of the filter. So if the file ended in a slash then we would store a big regex of the length from the start of the regex to the end of the file as the regex itself, then continue parsing as usual from the next filter correctly.
If the last line ended with a newline it would always detect things to not be regexs.
This has no effect on clients since they don't parse things, they just use already created DAT files.
We were wrongly checking end of the input buffer to see if a filter was a regex, instead of the end of the filter. So if the file ended in a slash then we would store a big regex of the length from the start of the regex to the end of the file as the regex itself, then continue parsing as usual from the next filter correctly.
If the last line ended with a newline it would always detect things to not be regexs.
This has no effect on clients since they don't parse things, they just use already created DAT files.
Fix https://github.com/brave/ad-block/issues/173