Skip to content

Commit 1fd7de8

Browse files
committed
auto merge of #13567 : iancormac84/rust/libc_windows_guid_fix, r=alexcrichton
structure's Data2 and Data3 members expect WORD types instead of DWORD. I discovered this discrepancy while experimenting with some bindings to Microsoft's OLE2 api. The discrepancy was corrupting the contents of the string returned by UuidToString after I used known GUIDs to test the accuracy of the function binding. I didn't add test cases because it would mean adding a dependency to my rather incomplete binding library. However, the fix produces expected string values when tested.
2 parents d8fa106 + fc4c6ee commit 1fd7de8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liblibc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1221,8 +1221,8 @@ pub mod types {
12211221

12221222
pub struct GUID {
12231223
pub Data1: DWORD,
1224-
pub Data2: DWORD,
1225-
pub Data3: DWORD,
1224+
pub Data2: WORD,
1225+
pub Data3: WORD,
12261226
pub Data4: [BYTE, ..8],
12271227
}
12281228

0 commit comments

Comments
 (0)