Skip to content

Commit

Permalink
Revert back to AllocMem
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusEdgar committed Sep 10, 2021
1 parent dddefdb commit 9bd721a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/tabexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#define BPEN_SEP_ID 104
#define PSTACK_ID 105

#define DEFAULT_PATH "System:C,System:Tools"
#define DEFAULT_PATH "SYS:C,SYS:Tools"

#define ESCAPE_C (unsigned char)'\033'
#define PLUS_C (unsigned char)'\012' //ctrl-j
Expand Down
5 changes: 2 additions & 3 deletions src/tabexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ static int init_dawin(void)
return DONE;
}

//vars = (struct Vars *)AllocMem(sizeof(struct Vars), MEMF_CLEAR); //-V2544
vars = (struct Vars *)malloc(sizeof(struct Vars)); //-V2544
vars = (struct Vars *)AllocMem(sizeof(struct Vars), MEMF_CLEAR); //-V2544
if (vars != NULL) {
vars->sgg_Extend.Pens[0] = (unsigned char)drawinfo->dri_Pens[FILLTEXTPEN];
vars->sgg_Extend.Pens[1] = (unsigned char)drawinfo->dri_Pens[FILLPEN];
Expand Down Expand Up @@ -774,6 +773,6 @@ static void cleanup(void)
freetext();
CloseWindow(dawin);
FreeSignal((long)deadsignum);
free(vars);
FreeMem(vars, sizeof(struct Vars));
FreeScreenDrawInfo(screen, drawinfo);
}
Binary file modified tabexec.info
Binary file not shown.

0 comments on commit 9bd721a

Please sign in to comment.