From 0c86432ea5e297995b54cb0d5ff01e5f99572e7e Mon Sep 17 00:00:00 2001 From: Martin Pilka Date: Tue, 12 Dec 2000 00:34:44 +0000 Subject: [PATCH] Changed the condition so it also works in case when sscanf returns EOF. --- server/registry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/registry.c b/server/registry.c index 3375e50a78a..e593903172b 100644 --- a/server/registry.c +++ b/server/registry.c @@ -1086,7 +1086,7 @@ static struct key *load_key( struct key *base, const char *buffer, unsigned int file_read_error( "Malformed key", info ); return NULL; } - if (!sscanf( buffer + res, " %d", &modif )) modif = time(NULL); + if (sscanf( buffer + res, " %d", &modif ) != 1) modif = time(NULL); p = (WCHAR *)info->tmp; while (prefix_len && *p) { if (*p++ == '\\') prefix_len--; }