Amiga: more review fixes
- NHW_BASE / NHW_OVER collided with NHW_PERMINVENT=6; renumber off NHW_LAST_TYPE. - GlyphToIcon used > 10000 instead of >=. - make_menu_items sized array by sizeof(amii_menu_item) instead of menu_item. - DoMenuScroll could deref NULL amip on SELECTUP. - get_nhuuid uses ISAAC64 rn2() instead of hand-rolled LCG. - fopenp's bound check fired one byte too late. - winami.p had stale signatures for amii_end_menu, amii_select_menu, amii_suspend_nhwindows.
This commit is contained in:
@@ -215,7 +215,7 @@ make_menu_items(struct amii_WinDesc *cw, menu_item **rmip)
|
||||
}
|
||||
|
||||
if (idx) {
|
||||
mmip = *rmip = (menu_item *) alloc(idx * sizeof(*mip));
|
||||
mmip = *rmip = (menu_item *) alloc(idx * sizeof(menu_item));
|
||||
for (mip = cw->menu.items; mip; mip = mip->next) {
|
||||
if (mip->selected) {
|
||||
mmip->item = mip->identifier;
|
||||
@@ -982,8 +982,8 @@ DoMenuScroll(int win, int blocking, int how, menu_item **retmip)
|
||||
amip->str[SOFF + 2] = '-';
|
||||
}
|
||||
}
|
||||
if (counting && amip->selected && amip->canselect
|
||||
&& amip->selector) {
|
||||
if (amip && counting && amip->selected
|
||||
&& amip->canselect && amip->selector) {
|
||||
amip->count = count;
|
||||
reset_counting = TRUE;
|
||||
amip->str[SOFF + 2] = '#';
|
||||
|
||||
Reference in New Issue
Block a user