[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 4/4] libc: Fix fuer Whitespace in scanf



! libc: Nach dem Lesen von Whitespace muss das erste
  Nicht-Whitespace-Zeichen in den Eingabepuffer zurueck

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/lib/stdlibc/scanf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/modules/lib/stdlibc/scanf.c b/src/modules/lib/stdlibc/scanf.c
index db665c5..6c19df7 100644
--- a/src/modules/lib/stdlibc/scanf.c
+++ b/src/modules/lib/stdlibc/scanf.c
@@ -199,6 +199,7 @@ static int jscanf(const char* fmt, va_list ap,
                 do {
                     c = jgetc(state);
                 } while (isspace(c));
+                jungetc(state, c);
                 break;
 
             case '%':
-- 
1.6.0.2