diff --git a/puer.c b/puer.c index ec8d4c5..e809a51 100644 --- a/puer.c +++ b/puer.c @@ -56,9 +56,9 @@ uint32_t bytes2word(unsigned char const bytes[4]) { } void word2bytes(unsigned char *bytes, uint32_t word) { - bytes[0] = word & 0xff; - bytes[1] = word>>8 & 0xff; - bytes[2] = word>>16 & 0xff; + bytes[0] = word; + bytes[1] = word>>8; + bytes[2] = word>>16; bytes[3] = word>>24; }