sscanf() returns EOF when it reaches the end of the string. Our code erroneously interprets this as if a number was read. The fix: we test for an explicit '1'. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>