Open siarsky opened 4 years ago
The library is cutting bits due to rotating of bits on a type unsigned char instead of the T type. Patch in PS
PS:
diff --git a/include/byte_stream.h b/include/byte_stream.h index 69afb1f..5f4219f 100644 --- a/include/byte_stream.h +++ b/include/byte_stream.h @@ -61,7 +61,7 @@ private: swap_endian(data); var = 0; for(unsigned int i = 0; i < width; ++i) - var |= (data.at(i) << (8 * ((width - 1) - i))); + var |= ((T)data.at(i) << (8 * ((width - 1) - i))); return SUCCESS; }
The library is cutting bits due to rotating of bits on a type unsigned char instead of the T type. Patch in PS
PS: