From 8a89c07261811bc8b32efae7d93a48e632dbf0ad Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 1 Jul 2012 22:11:25 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/include/editor.h | 2 +- polymer/eduke32/source/astub.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index a67f945ed..7ad52e471 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -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 //////////////////// diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 506868679..74576efa9 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -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;