[PATCH] [RegEdit]: warn about newest unicode export from native regedit
Eric Pouech
eric.pouech at orange.fr
Tue Jan 22 14:53:42 CST 2008
A+
---
programs/regedit/regproc.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 705faf6..8b1507d 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -483,10 +483,19 @@ void processRegLines(FILE *in)
{
LPSTR line = NULL; /* line read from input stream */
ULONG lineSize = REG_VAL_BUF_SIZE;
+ BYTE uni[2];
line = HeapAlloc(GetProcessHeap(), 0, lineSize);
CHECK_ENOUGH_MEMORY(line);
+ if (fread(uni, 2, 1, in) == 1) {
+ if (uni[0] == 0xff && uni[1] == 0xfe) {
+ printf("Trying to import from a unicode file: this isn't supported yet.\n"
+ "Please use export as Win 9x/NT4 files from native regedit\n");
+ return;
+ }
+ fseek(in, -2, SEEK_CUR);
+ }
while (!feof(in)) {
LPSTR s; /* The pointer into line for where the current fgets should read */
s = line;
More information about the wine-patches
mailing list