diff --git a/Quake/gl_fog.c b/Quake/gl_fog.c index 081c3641..8629a22f 100644 --- a/Quake/gl_fog.c +++ b/Quake/gl_fog.c @@ -208,7 +208,7 @@ void Fog_ParseWorldspawn (void) q_strlcpy(key, com_token + 1, sizeof(key)); else q_strlcpy(key, com_token, sizeof(key)); - while (strlen(key) > 0 && key[strlen(key)-1] == ' ') // remove trailing spaces + while (key[0] && key[strlen(key)-1] == ' ') // remove trailing spaces key[strlen(key)-1] = 0; data = COM_Parse(data); if (!data) diff --git a/Quake/gl_rmisc.c b/Quake/gl_rmisc.c index 2fa373f0..4aac8221 100644 --- a/Quake/gl_rmisc.c +++ b/Quake/gl_rmisc.c @@ -355,7 +355,7 @@ static void R_ParseWorldspawn (void) q_strlcpy(key, com_token + 1, sizeof(key)); else q_strlcpy(key, com_token, sizeof(key)); - while (strlen(key) > 0 && key[strlen(key)-1] == ' ') // remove trailing spaces + while (key[0] && key[strlen(key)-1] == ' ') // remove trailing spaces key[strlen(key)-1] = 0; data = COM_Parse(data); if (!data) diff --git a/Quake/gl_sky.c b/Quake/gl_sky.c index 3119ebe5..89868cc0 100644 --- a/Quake/gl_sky.c +++ b/Quake/gl_sky.c @@ -251,7 +251,7 @@ void Sky_NewMap (void) q_strlcpy(key, com_token + 1, sizeof(key)); else q_strlcpy(key, com_token, sizeof(key)); - while (strlen(key) > 0 && key[strlen(key)-1] == ' ') // remove trailing spaces + while (key[0] && key[strlen(key)-1] == ' ') // remove trailing spaces key[strlen(key)-1] = 0; data = COM_Parse(data); if (!data)