Skip to content

Commit

Permalink
menu proc needs to be toolparms and databank. otherwise the sta _tool…
Browse files Browse the repository at this point in the history
…Err trashes memory.
  • Loading branch information
ksherlock committed Mar 15, 2023
1 parent eeebcfb commit 4cb4f60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gopher.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ void WindowChange(void) {
MenuUpdate(c);
}

#pragma toolparms 1
#pragma databank 1
pascal word MenuProc(word message, MenuRecHndl menuRecH, Rect *rectPtr, word xHit, word yHit, word param) {
word rv = 0;
MenuRec *menu = *menuRecH;
Expand Down Expand Up @@ -338,6 +340,8 @@ pascal word MenuProc(word message, MenuRecHndl menuRecH, Rect *rectPtr, word xHi

return rv;
}
#pragma toolparms 0
#pragma databank 0

static MenuRec *ActivityMenu;
void UpdateActivityMenu(unsigned status) {
Expand Down

0 comments on commit 4cb4f60

Please sign in to comment.