17 |
|
|
18 |
|
size_t index(string.GetSize() % 2), offset(index); |
19 |
|
|
20 |
< |
_rmforeach (ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, half, 0, 2) *byte |= hex(string[index++]) << half * 4; |
20 |
> |
_rforeach (ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, half, 0, 2) *byte |= hex(string[index++]) << half * 4; |
21 |
|
|
22 |
|
if (offset != 0) |
23 |
|
{ |
24 |
|
bytes.InsertLast(0); |
25 |
|
|
26 |
|
bytes.Last() |= hex(string[0]); |
27 |
< |
bytes.Last() |= signed_ && bytes.Last() < 8 ? 0xF0 : 0; |
27 |
> |
bytes.Last() |= signed_ && bytes.Last() > 7 ? 0xF0 : 0; |
28 |
|
} |
29 |
|
} |
30 |
|
|
32 |
|
{ |
33 |
|
ext::String string; |
34 |
|
|
35 |
< |
_rforeach (ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, half, 0, 2) |
35 |
> |
_rforeach (const ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, half, 0, 2) |
36 |
|
{ |
37 |
|
byte_t hex(0xF & *byte >> half * 4); |
38 |
|
|