Closed radosroka closed 1 year ago
In parse_line_backwards, there is a variable delim being set to a space. It might be more efficient to make it a define SPACE ' ' so that it does not have to load a space into a variable on each call.
There is another variable delims. In the same function it looks like it loops collecting up addresses of delimiters and has a running total in count. The loop afterwards sets all addresses to 0. But it uses MAX_DELIMS instead of count for the loop maximum. If count was 1, then the second adrdess would be a random address that will get zeroed. I know there are supposed to be 2 delimiters, but it's safer to return an error if 2 are not found.
Otherwise, looks good.
Fixed.