Patches from Ben Hutchings to fix failures of sscanf error checking.