2 ms·
(buf[i]&0xf0) >> 8 would be zero (always). One hex digit (0x0f) is 4 bits wide, not 8 (one byte <=> two hex digits).
by myrmidon 12y ago
(buf[i]&0xf0) >> 8 would be zero (always).
One hex digit (0x0f) is 4 bits wide, not 8 (one byte <=> two hex digits).