editor: const char *scripthist -> char *, since it's alloc'd/freed

git-svn-id: https://svn.eduke32.com/eduke32@2795 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-07-01 22:11:25 +00:00
parent 650d859a6f
commit 8a89c07261
2 changed files with 3 additions and 3 deletions

View file

@ -292,7 +292,7 @@ extern int32_t showtags;
#define CLEARLINES2D(Startline, Numlines, Color) clearbuf((char *)(frameplace + ((Startline)*bytesperline)), (bytesperline*(Numlines))>>2, (Color))
#define SCRIPTHISTSIZ 32 // should be the same as OSD_HISTORYDEPTH for maximum win, should be a power of two
extern const char *scripthist[SCRIPTHISTSIZ];
extern char *scripthist[SCRIPTHISTSIZ];
extern int32_t scripthistend;
//////////////////// Aiming ////////////////////

View file

@ -100,7 +100,7 @@ static int32_t lastupdate, mousecol, mouseadd = 1, bstatus;
static int32_t usecwd = 0;
#endif
const char *scripthist[SCRIPTHISTSIZ];
char *scripthist[SCRIPTHISTSIZ];
int32_t scripthistend = 0;
int32_t g_lazy_tileselector = 0;
@ -9331,7 +9331,7 @@ static int32_t osdcmd_do(const osdfuncparm_t *parm)
if (dosave)
{
if (scripthist[scripthistend])
Bfree((void *)scripthist[scripthistend]);
Bfree(scripthist[scripthistend]);
scripthist[scripthistend] = Bstrdup(parm->raw);
scripthistend++;
scripthistend %= SCRIPTHISTSIZ;