https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9415740a14918ff8aff07...
commit b9415740a14918ff8aff0762fcfcaf395dc6617b Author: Getequ Getequ@users.noreply.github.com AuthorDate: Sat Jun 23 01:15:12 2018 +0700 Commit: Hermès BÉLUSCA - MAÏTO hermes.belusca-maito@reactos.org CommitDate: Fri Jun 22 20:15:12 2018 +0200
[REGEDIT] Fix importing very big *.reg files (HEX values commonly) (#618)
This bug was found when I tried to import *.reg with huge HEX value (about 500 and much more lines of hex text). --- base/applications/regedit/regproc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c index 8d09bb349b..c17221df5a 100644 --- a/base/applications/regedit/regproc.c +++ b/base/applications/regedit/regproc.c @@ -851,9 +851,15 @@ static void processRegLinesW(FILE *in) if(*s_eol == '\r' && *(s_eol+1) == '\n') NextLine++;
- while(*(NextLine+1) == ' ' || *(NextLine+1) == '\t') + while(isspaceW(*NextLine)) NextLine++;
+ if (!*NextLine) + { + s = NextLine; + break; + } + MoveMemory(s_eol - 1, NextLine, (CharsInBuf - (NextLine - s) + 1)*sizeof(WCHAR)); CharsInBuf -= NextLine - s_eol + 1; s_eol = 0;