1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
$NetBSD: patch-ab,v 1.5 2001/10/02 14:13:38 mrg Exp $
Index: source/screen.c
===================================================================
RCS file: /home/cvs/ircii/source/screen.c,v
retrieving revision 1.119
retrieving revision 1.121
diff -p -c -r1.119 -r1.121
*** source/screen.c 2001/05/19 20:57:36 1.119
--- source/screen.c 2001/07/20 00:42:39 1.121
*************** output_line(str, result, startpos)
*** 688,695 ****
/* parse all consequent colour settings */
int fg, bg;
! fg = *++ptr - 1;
! bg = *++ptr - 1;
if (fg < 16)
fgcolour = fg;
if (bg < 16)
--- 688,705 ----
/* parse all consequent colour settings */
int fg, bg;
! if (!*++ptr)
! {
! str = ptr;
! break;
! }
! fg = *ptr - 1;
! if (!*++ptr)
! {
! str = ptr;
! break;
! }
! bg = *ptr - 1;
if (fg < 16)
fgcolour = fg;
if (bg < 16)
*************** output_line(str, result, startpos)
*** 712,719 ****
}
if (written > CO)
len = len - (written - CO);
! if (!startpos)
! fwrite(str, len, 1, current_screen->fpout);
if (!underline)
{
--- 722,729 ----
}
if (written > CO)
len = len - (written - CO);
! if (!startpos && len > 0)
! fwrite(str, (size_t)len, 1, current_screen->fpout);
if (!underline)
{
*************** output_line(str, result, startpos)
*** 747,758 ****
}
if (written > CO)
len = len - (written - CO);
! if (!startpos)
! fwrite(str, len, 1, current_screen->fpout);
do
{
! charset_type = *++ptr;
! charset = *++ptr;
} while (ptr[1] == CHARSET_TAG && ptr++);
display_charset(charset_type, charset);
str = ++ptr;
--- 757,778 ----
}
if (written > CO)
len = len - (written - CO);
! if (!startpos && len > 0)
! fwrite(str, (size_t)len, 1, current_screen->fpout);
do
{
! if (!*++ptr)
! {
! str = ptr;
! break;
! }
! charset_type = *ptr;
! if (!*++ptr)
! {
! str = ptr;
! break;
! }
! charset = *ptr;
} while (ptr[1] == CHARSET_TAG && ptr++);
display_charset(charset_type, charset);
str = ++ptr;
|