Fixed infinite loop and added checks for the sscanf result.
1 file changed