change sscanf to return zero for an empty input string