On Mon, Oct 5, 2020 at 3:01 PM <poesc...@lemonage.de> wrote: > > + while (*esc && i < LCD2S_CHARACTER_SIZE + 2) { > + shift ^= 4; > + if (*esc >= '0' && *esc <= '9') { > + value |= (*esc - '0') << shift; > + } else if (*esc >= 'A' && *esc <= 'Z') { > + value |= (*esc - 'A' + 10) << shift; > + } else if (*esc >= 'a' && *esc <= 'z') { > + value |= (*esc - 'a' + 10) << shift;
This should also probably use hex_to_bin() or similar (see my other comment on patch 24) and/or share the implementation as much as possible. Cheers, Miguel