In sscanf in the the format parameter any white-space character (as determined by the isspace() function) will match zero or more white-space characters from the input stream.
This leads to errors if one of the arguments is missing when rtweight tries to parse a .density file.
19.32 Gold, pure
would pass inspection matching the id as 19 and the density as 0.32.
The patch also treats the case when the .density file is empty.
I'd also like to add a few lines to the regression test weight.sh to validate the above mentioned cases. Any thoughts on this?
Log in to post a comment.