Commit e08595f5 authored by nagayama15's avatar nagayama15

Fix bit stream.

parent ffdff2ba
......@@ -65,7 +65,7 @@ namespace nykk
for (std::size_t i = 0; i < size_bits; i++)
{
data |= read_bit() ? 1 << i : 0;
data |= read_bit() ? std::uint64_t {1} << i : 0;
}
return data;
......
......@@ -22,6 +22,9 @@ inline void run_test_circular_bit_stream()
assert(s.read(16) == 0xb98e);
assert(s.pos_bit() == 4);
assert(s.read(64) == 0xb98efcdab98efcda);
assert(s.pos_bit() == 4);
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment