From b058648ae3be6f4bb8cbace3ad63be2777b50b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Mon, 25 Aug 2008 23:38:53 +0200 Subject: [PATCH] regedit: Fix concat handling for ANSI files. --- programs/regedit/regproc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 8f05a2d6e45..b65595e9d55 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -666,13 +666,22 @@ void processRegLinesA(FILE *in) if (s_eol > line && *(s_eol-1) == '\\') { int c; s = s_eol-1; - /* The following error protection could be made more self- - * correcting but I thought it not worth trying. - */ - if ((c = fgetc (in)) == EOF || c != ' ' || - (c = fgetc (in)) == EOF || c != ' ') + + do + { + c = fgetc(in); + } while(c == ' ' || c == '\t'); + + if(c == EOF) + { fprintf(stderr,"%s: ERROR - invalid continuation.\n", getAppName()); + } + else + { + *s = c; + s++; + } continue; }