summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2009-06-23 13:51:36 +0000
committerHisham Muhammad <hisham@gobolinux.org>2009-06-23 13:51:36 +0000
commit2b53419983f681aff7bd4e5141bd248d651387f9 (patch)
treefc451da2341a2ed857c2e00ae0f2c5bb06b2568a /htop.c
parent3e6be2d7f7492ecd6cf5c1a6647e403e9be59de9 (diff)
* BUGFIX: Fix crash on F6 key
(thanks to Rainer Suhm)
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/htop.c b/htop.c
index 47f16dbc..fee60928 100644
--- a/htop.c
+++ b/htop.c
@@ -151,7 +151,7 @@ static void showHelp(ProcessList* pl) {
clear();
}
-static char* CategoriesFunctions[10] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done "};
+static char* CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
static void Setup_run(Settings* settings, int headerHeight) {
ScreenManager* scr = ScreenManager_new(0, headerHeight, 0, -1, HORIZONTAL, true);
@@ -190,8 +190,8 @@ static HandlerResult pickWithEnter(Panel* panel, int ch) {
}
static Object* pickFromVector(Panel* panel, Panel* list, int x, int y, char** keyLabels, FunctionBar* prevBar) {
- char* fuKeys[2] = {"Enter", "Esc"};
- int fuEvents[2] = {13, 27};
+ char* fuKeys[] = {"Enter", "Esc", NULL};
+ int fuEvents[] = {13, 27};
if (!list->eventHandler)
Panel_setEventHandler(list, pickWithEnter);
ScreenManager* scr = ScreenManager_new(0, y, 0, -1, HORIZONTAL, false);
@@ -656,7 +656,7 @@ int main(int argc, char** argv) {
Panel* affinityPanel = AffinityPanel_new(pl->processorCount, curr);
- char* fuFunctions[2] = {"Set ", "Cancel "};
+ char* fuFunctions[] = {"Set ", "Cancel ", NULL};
void* set = pickFromVector(panel, affinityPanel, 15, headerHeight, fuFunctions, defaultBar);
if (set) {
unsigned long new = AffinityPanel_getAffinity(affinityPanel);
@@ -695,7 +695,7 @@ int main(int argc, char** argv) {
{
Panel* sortPanel = Panel_new(0, 0, 0, 0, LISTITEM_CLASS, true, ListItem_compare);
Panel_setHeader(sortPanel, "Sort by");
- char* fuFunctions[2] = {"Sort ", "Cancel "};
+ char* fuFunctions[] = {"Sort ", "Cancel ", NULL};
ProcessField* fields = pl->fields;
for (int i = 0; fields[i]; i++) {
char* name = String_trim(Process_fieldTitles[fields[i]]);

© 2014-2024 Faster IT GmbH | imprint | privacy policy