From c89518ead49ff9da57d12f47e2d4cb9d0b35dfb2 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 14 Aug 2021 22:11:59 -0400 Subject: [PATCH] [common] option: use isspace from --- common/src/option.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/option.c b/common/src/option.c index d0039451..e116c0f7 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -22,6 +22,7 @@ #include "common/debug.h" #include "common/stringutils.h" +#include #include #include #include @@ -508,7 +509,7 @@ bool option_load(const char * filename) } //rtrim - while(nameLen > 1 && (name[nameLen-1] == ' ' || name[nameLen-1] == '\t')) + while (nameLen > 1 && isspace(name[nameLen-1])) --nameLen; name[nameLen] = '\0'; expectValue = true; @@ -545,7 +546,7 @@ bool option_load(const char * filename) line = false; //ltrim - if (*len == 0 && (c == ' ' || c == '\t')) + if (*len == 0 && isspace(c)) break; if (*len % 32 == 0)