From: havoc Date: Sun, 2 May 2004 03:54:31 +0000 (+0000) Subject: clean up vector parsing in ED_ParseEpair, now stores 0 into any vector components... X-Git-Tag: xonotic-v0.1.0preview~5901 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a71dc710a4e49d40135e3573f3a5ff4b0ff218ae;p=xonotic%2Fdarkplaces.git clean up vector parsing in ED_ParseEpair, now stores 0 into any vector components that can not be read due to end of string git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4120 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/pr_edict.c b/pr_edict.c index 1cb4bf9c..4643f3e4 100644 --- a/pr_edict.c +++ b/pr_edict.c @@ -946,13 +946,12 @@ qboolean ED_ParseEpair(edict_t *ent, ddef_t *key, const char *s) { while (*s && *s <= ' ') s++; - if (!*s) - break; - val->vector[i] = atof(s); + if (*s) + val->vector[i] = atof(s); + else + val->vector[i] = 0; while (*s > ' ') s++; - if (!*s) - break; } break;