1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Fix to link_font() from RDB. I must get him to comment some of this :-)

[originally from svn r1249]
This commit is contained in:
Simon Tatham 2001-09-07 23:02:07 +00:00
parent ea788e29c7
commit c1e38248b1

View File

@ -420,14 +420,14 @@ void init_ucs_tables(void)
static void link_font(WCHAR * line_tbl, WCHAR * font_tbl, WCHAR attr) static void link_font(WCHAR * line_tbl, WCHAR * font_tbl, WCHAR attr)
{ {
int i, j, k; int font_index, line_index, i;
for (k = 0; k < 256; k++) { for (line_index = 0; line_index < 256; line_index++) {
i = ((k + 32) & 0xFF); if (DIRECT_FONT(line_tbl[line_index]))
if (DIRECT_FONT(line_tbl[i]))
continue; continue;
for (j = 0; j < 256; j++) { for(i = 0; i < 256; i++) {
if (line_tbl[i] == font_tbl[j]) { font_index = ((32 + i) & 0xFF);
line_tbl[i] = (WCHAR) (attr + j); if (line_tbl[line_index] == font_tbl[font_index]) {
line_tbl[line_index] = (WCHAR) (attr + font_index);
break; break;
} }
} }