lib_sscanf: fixed a hang in scanf() on end of string

if we reach end of buffer when we are not on a format specifier then
the code would loop forever.
Merge pull request #24 from tridge/pullrequest-sscanf-hang

lib_sscanf: fixed a hang in scanf() on end of string