mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix vscanf_callback(3) not ungetcing the last character when stopping.
This commit is contained in:
parent
1986bc2ba2
commit
02c18f868f
1 changed files with 3 additions and 0 deletions
|
@ -108,7 +108,10 @@ int vscanf_callback(void* fp,
|
||||||
{
|
{
|
||||||
case MODE_INIT:
|
case MODE_INIT:
|
||||||
if ( !*format )
|
if ( !*format )
|
||||||
|
{
|
||||||
|
ungetc(ic, fp);
|
||||||
goto break_loop;
|
goto break_loop;
|
||||||
|
}
|
||||||
if ( isspace(*formatuc) )
|
if ( isspace(*formatuc) )
|
||||||
{
|
{
|
||||||
if ( isspace(ic) )
|
if ( isspace(ic) )
|
||||||
|
|
Loading…
Add table
Reference in a new issue