mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
pr_edict.c (ED_ParseEpair): remove a developer.value check before the Con_Dwarning call added by r1527
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1528 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
78970b5323
commit
c5b2c6a848
1 changed files with 5 additions and 6 deletions
|
@ -771,7 +771,7 @@ Can parse either fields or globals
|
|||
returns false if error
|
||||
=============
|
||||
*/
|
||||
static qboolean ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
||||
static qboolean ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
||||
{
|
||||
int i;
|
||||
char string[128];
|
||||
|
@ -798,7 +798,7 @@ static qboolean ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
|||
end = (char *)string + strlen(string);
|
||||
v = string;
|
||||
w = string;
|
||||
|
||||
|
||||
for (i = 0; i < 3 && (w <= end); i++) // ericw -- added (w <= end) check
|
||||
{
|
||||
// set `v` to the next space (or 0 byte), and change that char to a 0 byte
|
||||
|
@ -808,12 +808,11 @@ static qboolean ED_ParseEpair (void *base, ddef_t *key, const char *s)
|
|||
((float *)d)[i] = atof (w);
|
||||
w = v = v+1;
|
||||
}
|
||||
|
||||
// ericw -- fill remaining elements to 0.0f in case we hit the end of string before reading 3 floats
|
||||
|
||||
// ericw -- fill remaining elements to 0.0f in case we hit the end of string before reading 3 floats
|
||||
if (i < 3)
|
||||
{
|
||||
if (developer.value)
|
||||
Con_DWarning("vanilla will read garbage for \"%s\" \"%s\"\n", PR_GetString(key->s_name), s);
|
||||
Con_DWarning("vanilla will read garbage for \"%s\" \"%s\"\n", PR_GetString(key->s_name), s);
|
||||
for (; i < 3; i++)
|
||||
((float *)d)[i] = 0.0f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue