From 4865a190578b900b48571e74e0bd97bef88ea71b Mon Sep 17 00:00:00 2001
From: James R <justsomejames2@gmail.com>
Date: Thu, 26 Dec 2019 18:23:01 -0800
Subject: [PATCH] One more optimization
---
src/command.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/command.c b/src/command.c
index 5e9453b16..40efa1eee 100644
--- a/src/command.c
+++ b/src/command.c
@@ -427,16 +427,17 @@ static void COM_TokenizeString(char *ptext)
com_argc = 0;
com_args = NULL;
- com_flags = 0;
- while (com_argc < MAX_ARGS)
+ if (ptext[0] == '\033')
{
- if (ptext[0] == '\033')
- {
- com_flags = (unsigned)ptext[1];
- ptext += 2;
- }
+ com_flags = (unsigned)ptext[1];
+ ptext += 2;
+ }
+ else
+ com_flags = 0;
+ while (com_argc < MAX_ARGS)
+ {
// Skip whitespace up to a newline.
while (*ptext != '\0' && *ptext <= ' ' && *ptext != '\n')
ptext++;
--
GitLab