1
From: Teemu Ikonen <tpikonen@gmail.com>
2
Subject: Fix null pointer ref on File menu keyboard shortcuts in x11win.c.
3
X-git-branch: p/x11shortcuts
5
src/x11win.c | 55 ++++++++++++++++++++++++++++---------------------------
6
1 files changed, 28 insertions(+), 27 deletions(-)
8
diff --git a/src/x11win.c b/src/x11win.c
9
index 7284260..1e4368e 100644
12
@@ -287,6 +287,7 @@ typedef struct _MenuItem {
18
static MenuItem FilMenu[21] = {
19
{ &MsgStrs[StrMOpen] /* "Open..." */, 0x11, &MsgAuxl[StrMOpen],
20
@@ -301,35 +302,35 @@ static MenuItem FilMenu[21] = {
21
&MsgLens[StrMExit], NULL, 0 },
22
{ &MsgStrs[StrMEmpty] /* "" */, 0x08, &MsgAuxl[StrMEmpty],
23
&MsgLens[StrMEmpty], NULL, 0 },
24
- { &(MolNStr[0]), 0x01, 0,
25
- &MolNLen[0], &MoleculeIndex, 0 },
26
- { &(MolNStr[1]), 0x01, 0,
27
- &MolNLen[1], &MoleculeIndex, 1 },
28
- { &(MolNStr[2]), 0x01, 0,
29
- &MolNLen[2], &MoleculeIndex, 2 },
30
- { &(MolNStr[3]), 0x01, 0,
31
- &MolNLen[3], &MoleculeIndex, 3 },
32
- { &(MolNStr[4]), 0x01, 0,
33
+ { &(MolNStr[0]), 0x01, &zero,
34
+ &MolNLen[0], &MoleculeIndex, 0 },
35
+ { &(MolNStr[1]), 0x01, &zero,
36
+ &MolNLen[1], &MoleculeIndex, 1 },
37
+ { &(MolNStr[2]), 0x01, &zero,
38
+ &MolNLen[2], &MoleculeIndex, 2 },
39
+ { &(MolNStr[3]), 0x01, &zero,
40
+ &MolNLen[3], &MoleculeIndex, 3 },
41
+ { &(MolNStr[4]), 0x01, &zero,
42
&MolNLen[4], &MoleculeIndex, 4 },
43
- { &(MolNStr[5]), 0x01, 0,
44
- &MolNLen[5], &MoleculeIndex, 5 },
45
- { &(MolNStr[6]), 0x01, 0,
46
- &MolNLen[6], &MoleculeIndex, 6 },
47
- { &(MolNStr[7]), 0x01, 0,
48
- &MolNLen[7], &MoleculeIndex, 7 },
49
- { &(MolNStr[8]), 0x01, 0,
50
- &MolNLen[8], &MoleculeIndex, 8 },
51
- { &(MolNStr[9]), 0x01, 0,
52
+ { &(MolNStr[5]), 0x01, &zero,
53
+ &MolNLen[5], &MoleculeIndex, 5 },
54
+ { &(MolNStr[6]), 0x01, &zero,
55
+ &MolNLen[6], &MoleculeIndex, 6 },
56
+ { &(MolNStr[7]), 0x01, &zero,
57
+ &MolNLen[7], &MoleculeIndex, 7 },
58
+ { &(MolNStr[8]), 0x01, &zero,
59
+ &MolNLen[8], &MoleculeIndex, 8 },
60
+ { &(MolNStr[9]), 0x01, &zero,
61
&MolNLen[9], &MoleculeIndex, 9 },
62
- { &(MolNStr[10]), 0x01, 0,
63
- &MolNLen[10], &MoleculeIndex, 10 },
64
- { &(MolNStr[11]), 0x01, 0,
65
- &MolNLen[11], &MoleculeIndex, 11 },
66
- { &(MolNStr[12]), 0x01, 0,
67
- &MolNLen[12], &MoleculeIndex, 12 },
68
- { &(MolNStr[13]), 0x01, 0,
69
- &MolNLen[13], &MoleculeIndex, 13 },
70
- { &(MolNStr[14]), 0x01, 0,
71
+ { &(MolNStr[10]), 0x01, &zero,
72
+ &MolNLen[10], &MoleculeIndex, 10 },
73
+ { &(MolNStr[11]), 0x01, &zero,
74
+ &MolNLen[11], &MoleculeIndex, 11 },
75
+ { &(MolNStr[12]), 0x01, &zero,
76
+ &MolNLen[12], &MoleculeIndex, 12 },
77
+ { &(MolNStr[13]), 0x01, &zero,
78
+ &MolNLen[13], &MoleculeIndex, 13 },
79
+ { &(MolNStr[14]), 0x01, &zero,
80
&MolNLen[14], &MoleculeIndex, 14 }};
82
static MenuItem DisMenu[9] = {