mirror of https://github.com/FreeRDP/FreeRDP
[winpr,sspi] fix wchar to byte endianess
This commit is contained in:
parent
775dac79db
commit
0b0eae2adc
|
@ -323,6 +323,19 @@ fail:
|
|||
|
||||
static int hexchar2nibble(WCHAR wc)
|
||||
{
|
||||
#if defined(__BIG_ENDIAN__)
|
||||
union
|
||||
{
|
||||
BYTE b[2];
|
||||
WCHAR w;
|
||||
} cnv;
|
||||
cnv.w = wc;
|
||||
const BYTE b = cnv.b[0];
|
||||
cnv.b[0] = cnv.b[1];
|
||||
cnv.b[1] = b;
|
||||
wc = cnv.w;
|
||||
#endif
|
||||
|
||||
switch (wc)
|
||||
{
|
||||
case L'0':
|
||||
|
|
Loading…
Reference in New Issue