summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--htop.c10
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a397987..06867524 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
-What's new in version 0.8.2.1
+What's new in version 0.8.3
+* BUGFIX: Fix crash on F6 key
+ (thanks to Rainer Suhm)
* BUGFIX: Fix a minor bug which affected the build process.
What's new in version 0.8.2
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]]);