Hugh McMaster : reg: Handle data for REG_DWORD_LITTLE_ENDIAN and REG_DWORD_BIG_ENDIAN.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 15 09:41:50 CST 2016


Module: wine
Branch: master
Commit: b14e1ba801f5a3323c5e88d46a95355372780356
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b14e1ba801f5a3323c5e88d46a95355372780356

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon Feb 15 23:15:33 2016 +1100

reg: Handle data for REG_DWORD_LITTLE_ENDIAN and REG_DWORD_BIG_ENDIAN.

REG_DWORD_LITTLE_ENDIAN is #define'd as REG_DWORD, so the LITTLE_ENDIAN
case is just a comment added for clarity.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/reg/reg.c       | 2 ++
 programs/reg/tests/reg.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index d648cd0..663f835 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -238,6 +238,8 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r
             break;
         }
         case REG_DWORD:
+     /* case REG_DWORD_LITTLE_ENDIAN: */
+        case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
         {
             LPWSTR rest;
             DWORD val;
diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c
index eac5d60..aedca14 100644
--- a/programs/reg/tests/reg.c
+++ b/programs/reg/tests/reg.c
@@ -308,7 +308,7 @@ static void test_add(void)
     run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_BE /t REG_DWORD_BIG_ENDIAN /d 456 /f", &r);
     ok(r == REG_EXIT_SUCCESS, "got exit code %u\n", r);
     dword = 456;
-    verify_reg(hkey, "DWORD_BE", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), TODO_REG_SIZE);
+    verify_reg(hkey, "DWORD_BE", REG_DWORD_BIG_ENDIAN, &dword, sizeof(dword), 0);
     /* REG_DWORD_BIG_ENDIAN is broken in every version of windows. It behaves like
      * an ordinary REG_DWORD - that is little endian. GG */
 




More information about the wine-cvs mailing list