Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e8c04f7 authored by Robert Abel's avatar Robert Abel Committed by Miguel Ojeda
Browse files

auxdisplay: charlcd: fix hex literal ranges for graphics command



The graphics command expects 16 hexadecimal literals, but would allow
characters in range [0-9a-zA-Z] instead of [0-9a-fA-F].

Signed-off-by: default avatarRobert Abel <rabel@robertabel.eu>
Acked-by: default avatarWilly Tarreau <w@1wt.eu>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent 99b9b490
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -443,9 +443,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd)
			shift ^= 4;
			if (*esc >= '0' && *esc <= '9') {
				value |= (*esc - '0') << shift;
			} else if (*esc >= 'A' && *esc <= 'Z') {
			} else if (*esc >= 'A' && *esc <= 'F') {
				value |= (*esc - 'A' + 10) << shift;
			} else if (*esc >= 'a' && *esc <= 'z') {
			} else if (*esc >= 'a' && *esc <= 'f') {
				value |= (*esc - 'a' + 10) << shift;
			} else {
				esc++;