mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-02-09 01:41:09 +00:00
* fixed a warning and an error in the overflow check in l_net
* const stuff for GetNextChainItem (bobtoolz) git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@303 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
88cea027e6
commit
0e5c89d2c0
3 changed files with 8 additions and 8 deletions
|
@ -49,7 +49,7 @@ const char* GetCurrentTexture()
|
||||||
return g_CurrentTexture;
|
return g_CurrentTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
epair_t* GetNextChainItem(epair_t* lastItem, char* key, char* value)
|
epair_t* GetNextChainItem(epair_t* lastItem, const char* key, const char* value)
|
||||||
{
|
{
|
||||||
epair_t* nextEPair = g_FuncTable.m_pfnAllocateEpair(key, value);
|
epair_t* nextEPair = g_FuncTable.m_pfnAllocateEpair(key, value);
|
||||||
|
|
||||||
|
@ -259,9 +259,9 @@ void StartBSP()
|
||||||
GetFilename(exename, "q3map");
|
GetFilename(exename, "q3map");
|
||||||
UnixToDosPath(exename); // do we want this done in linux version?
|
UnixToDosPath(exename); // do we want this done in linux version?
|
||||||
|
|
||||||
char mapname[256];
|
char mapname[256];
|
||||||
const char *pn = g_FuncTable.m_pfnReadProjectKey("mapspath");
|
const char *pn = g_FuncTable.m_pfnReadProjectKey("mapspath");
|
||||||
|
|
||||||
strcpy( mapname, pn );
|
strcpy( mapname, pn );
|
||||||
strcat( mapname, "/ac_prt.map" );
|
strcat( mapname, "/ac_prt.map" );
|
||||||
UnixToDosPath(mapname);
|
UnixToDosPath(mapname);
|
||||||
|
@ -279,7 +279,7 @@ void BuildMiniPrt(list<Str>* exclusionList)
|
||||||
// doors, etc
|
// doors, etc
|
||||||
|
|
||||||
DEntity world;
|
DEntity world;
|
||||||
|
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
const char *pn = g_FuncTable.m_pfnReadProjectKey("mapspath");
|
const char *pn = g_FuncTable.m_pfnReadProjectKey("mapspath");
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
vec_t Min(vec_t a, vec_t b);
|
vec_t Min(vec_t a, vec_t b);
|
||||||
|
|
||||||
epair_t* GetNextChainItem(epair_t* lastItem, char* key, char* value);
|
epair_t* GetNextChainItem(epair_t* lastItem, const char* key, const char* value);
|
||||||
|
|
||||||
// reads current texture into global, returns pointer to it
|
// reads current texture into global, returns pointer to it
|
||||||
const char* GetCurrentTexture();
|
const char* GetCurrentTexture();
|
||||||
|
|
|
@ -483,7 +483,7 @@ void NMSG_WriteString(netmessage_t *msg, char *string)
|
||||||
WinPrint("NMSG_WriteString: overflow\n");
|
WinPrint("NMSG_WriteString: overflow\n");
|
||||||
return;
|
return;
|
||||||
} //end if
|
} //end if
|
||||||
strcpy(&msg->data[msg->size], string);
|
memcpy(&msg->data[msg->size], string, strlen(string) + 1);
|
||||||
msg->size += strlen(string) + 1;
|
msg->size += strlen(string) + 1;
|
||||||
} //end of the function NMSG_WriteString
|
} //end of the function NMSG_WriteString
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -505,7 +505,7 @@ void NMSG_ReadStart(netmessage_t *msg)
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
int NMSG_ReadChar(netmessage_t *msg)
|
int NMSG_ReadChar(netmessage_t *msg)
|
||||||
{
|
{
|
||||||
if (msg->size + 1 > msg->size)
|
if (msg->read + 1 > msg->size)
|
||||||
{
|
{
|
||||||
msg->readoverflow = qtrue;
|
msg->readoverflow = qtrue;
|
||||||
WinPrint("NMSG_ReadChar: read overflow\n");
|
WinPrint("NMSG_ReadChar: read overflow\n");
|
||||||
|
@ -607,7 +607,7 @@ char *NMSG_ReadString(netmessage_t *msg)
|
||||||
{
|
{
|
||||||
static char string[2048];
|
static char string[2048];
|
||||||
int l, c;
|
int l, c;
|
||||||
|
|
||||||
l = 0;
|
l = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue