lib/winbd: fix wind_ucs2write with WIND_RW_LE

Pair-Programmed-With: Arvid Requate <requate@univention.de>

metze

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:
Stefan Metzmacher
2011-11-15 15:57:40 +01:00
committed by Love Hornquist Astrand
parent dcd34e5967
commit 805304d3f8

View File

@@ -346,8 +346,8 @@ wind_ucs2write(const uint16_t *in, size_t in_len, unsigned int *flags,
return WIND_ERR_OVERRUN;
if ((*flags) & WIND_RW_LE) {
p[0] = (bom >> 8) & 0xff;
p[1] = (bom ) & 0xff;
p[0] = (bom ) & 0xff;
p[1] = (bom >> 8) & 0xff;
} else {
p[1] = (bom ) & 0xff;
p[0] = (bom >> 8) & 0xff;
@@ -360,8 +360,8 @@ wind_ucs2write(const uint16_t *in, size_t in_len, unsigned int *flags,
if (len < 2)
return WIND_ERR_OVERRUN;
if ((*flags) & WIND_RW_LE) {
p[0] = (in[0] >> 8) & 0xff;
p[1] = (in[0] ) & 0xff;
p[0] = (in[0] ) & 0xff;
p[1] = (in[0] >> 8) & 0xff;
} else {
p[1] = (in[0] ) & 0xff;
p[0] = (in[0] >> 8) & 0xff;