From 0a6a5c62c835b015343808b8b17e4a8729ff93f2 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 12 Sep 2019 12:33:02 +0000 Subject: [PATCH] minor simplification git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1629 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/gl_fog.c | 2 +- Quake/gl_rmisc.c | 2 +- Quake/gl_sky.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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)