Make all tests in libdialog compilable.
Fix coredump in menu3.c. Approved by: kib (mentor)
This commit is contained in:
parent
8284562954
commit
516ce862b0
@ -47,13 +47,13 @@ static int spending;
|
||||
static int
|
||||
check(dialogMenuItem *self)
|
||||
{
|
||||
return ((int)self->data == spending);
|
||||
return ((int)(intptr_t)self->data == spending);
|
||||
}
|
||||
|
||||
static int
|
||||
spend(dialogMenuItem *self)
|
||||
{
|
||||
spending = (int)self->data;
|
||||
spending = (int)(intptr_t)self->data;
|
||||
return DITEM_SUCCESS | DITEM_REDRAW;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ maybe(dialogMenuItem *self)
|
||||
static char *insurance[] = {
|
||||
"1,000,000", "Mondo insurance policy", "Off",
|
||||
"5,000,000", "Mega insurance policy", "Off",
|
||||
"10,000,000", "Friend! Most Favored customer!"
|
||||
"10,000,000", "Friend! Most Favored customer!", "On"
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -31,13 +31,13 @@ static int spending;
|
||||
static int
|
||||
check(dialogMenuItem *self)
|
||||
{
|
||||
return ((int)self->data == spending);
|
||||
return ((int)(intptr_t)self->data == spending);
|
||||
}
|
||||
|
||||
static int
|
||||
spend(dialogMenuItem *self)
|
||||
{
|
||||
spending = (int)self->data;
|
||||
spending = (int)(intptr_t)self->data;
|
||||
return DITEM_SUCCESS | DITEM_REDRAW;
|
||||
}
|
||||
|
||||
|
@ -31,13 +31,13 @@ static int spending;
|
||||
static int
|
||||
check(dialogMenuItem *self)
|
||||
{
|
||||
return ((int)self->data == spending);
|
||||
return ((int)(intptr_t)self->data == spending);
|
||||
}
|
||||
|
||||
static int
|
||||
spend(dialogMenuItem *self)
|
||||
{
|
||||
spending = (int)self->data;
|
||||
spending = (int)(intptr_t)self->data;
|
||||
return DITEM_SUCCESS | DITEM_REDRAW;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user