* BUGFIX: Fix crash on F6 key

(thanks to Rainer Suhm)
This commit is contained in:
Hisham Muhammad 2009-06-23 13:51:36 +00:00
parent 3e6be2d7f7
commit 2b53419983
2 changed files with 8 additions and 6 deletions

View File

@ -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

10
htop.c
View File

@ -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]]);