From a71dc710a4e49d40135e3573f3a5ff4b0ff218ae Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 2 May 2004 03:54:31 +0000 Subject: [PATCH] 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 --- pr_edict.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; -- 2.39.2