aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/vt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 44f03ddd8871..34bfb056d7a6 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -105,6 +105,7 @@
105#include <asm/system.h> 105#include <asm/system.h>
106#include <linux/uaccess.h> 106#include <linux/uaccess.h>
107#include <linux/kdb.h> 107#include <linux/kdb.h>
108#include <linux/ctype.h>
108 109
109#define MAX_NR_CON_DRIVER 16 110#define MAX_NR_CON_DRIVER 16
110 111
@@ -1796,8 +1797,8 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)
1796 vc->vc_state = ESnormal; 1797 vc->vc_state = ESnormal;
1797 return; 1798 return;
1798 case ESpalette: 1799 case ESpalette:
1799 if ( (c>='0'&&c<='9') || (c>='A'&&c<='F') || (c>='a'&&c<='f') ) { 1800 if (isxdigit(c)) {
1800 vc->vc_par[vc->vc_npar++] = (c > '9' ? (c & 0xDF) - 'A' + 10 : c - '0'); 1801 vc->vc_par[vc->vc_npar++] = hex_to_bin(c);
1801 if (vc->vc_npar == 7) { 1802 if (vc->vc_npar == 7) {
1802 int i = vc->vc_par[0] * 3, j = 1; 1803 int i = vc->vc_par[0] * 3, j = 1;
1803 vc->vc_palette[i] = 16 * vc->vc_par[j++]; 1804 vc->vc_palette[i] = 16 * vc->vc_par[j++];