From 1747bc460e2a711e016a2fa5f8fac5ad5a94b4df Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 4 Jun 2008 08:58:02 +0000 Subject: [PATCH] win32 gcc 4.3.0 fixes git-svn-id: https://svn.eduke32.com/eduke32@760 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/include/glbuild.h | 4 +--- polymer/eduke32/source/config.c | 2 +- polymer/eduke32/source/game.c | 2 +- polymer/eduke32/source/gameexec.c | 8 ++++---- polymer/eduke32/source/osdcmds.c | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/polymer/build/include/glbuild.h b/polymer/build/include/glbuild.h index a2e7b2706..89d58e7bc 100644 --- a/polymer/build/include/glbuild.h +++ b/polymer/build/include/glbuild.h @@ -18,10 +18,8 @@ //#include #if defined(__APPLE__) # include -#elif defined(_MSC_VER) -# include "glext.h" #else -# include "GL/glext.h" +# include "glext.h" #endif #ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index c88b6e5ae..c57834699 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -576,7 +576,7 @@ int32 CONFIG_ReadSetup(void) tempbuf[Bstrlen(tempbuf)-1] = '\0'; Bstrncpy(myname,tempbuf,sizeof(myname)-1); - myname[sizeof(myname)] = '\0'; + myname[sizeof(myname)-1] = '\0'; SCRIPT_GetString(ud.config.scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 54a25e5b7..8a4ff8c92 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9873,7 +9873,7 @@ static void Startup(void) tempbuf[Bstrlen(tempbuf)-1] = '\0'; Bstrncpy(myname,tempbuf,sizeof(myname)-1); - myname[sizeof(myname)] = '\0'; + myname[sizeof(myname)-1] = '\0'; } if (CommandMap) diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 22343287c..4a3a92aa3 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -1912,10 +1912,10 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) case PLAYER_WEAPRECS: if (iSet) { - g_player[iPlayer].ps->weaprecs[16]=lValue; + g_player[iPlayer].ps->weaprecs[15]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->weaprecs[16], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->weaprecs[15], g_i, g_p); return; case PLAYER_WEAPRECCNT: @@ -2143,14 +2143,14 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) SetGameVarID(lVar2, g_player[iPlayer].ps->on_ground, g_i, g_p); return; - case PLAYER_NAME: +/* case PLAYER_NAME: if (iSet) { g_player[iPlayer].ps->name[32]=lValue; return; } SetGameVarID(lVar2, g_player[iPlayer].ps->name[32], g_i, g_p); - return; + return;*/ case PLAYER_INVEN_ICON: if (iSet) diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index ec5dfff0b..ad6a210a6 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -942,7 +942,7 @@ static int osdcmd_name(const osdfuncparm_t *parm) tempbuf[Bstrlen(tempbuf)-1] = '\0'; Bstrncpy(myname,tempbuf,sizeof(myname)-1); - myname[sizeof(myname)] = '\0'; + myname[sizeof(myname)-1] = '\0'; OSD_Printf("name %s\n",myname);