From 4b0746edc839f4cee45a785d749f8df16822184a Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Fri, 13 Sep 2002 00:33:44 +0000 Subject: [PATCH] ctype routines require a cast to (unsigned int) --- panda/src/putil/string_utils.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panda/src/putil/string_utils.cxx b/panda/src/putil/string_utils.cxx index 59a25110ca..5cc0e1eba2 100644 --- a/panda/src/putil/string_utils.cxx +++ b/panda/src/putil/string_utils.cxx @@ -110,18 +110,18 @@ extract_words(const string &str, vector_string &words) { int num_words = 0; size_t pos = 0; - while (pos < str.length() && isspace(str[pos])) { + while (pos < str.length() && isspace((unsigned int)str[pos])) { pos++; } while (pos < str.length()) { size_t word_start = pos; - while (pos < str.length() && !isspace(str[pos])) { + while (pos < str.length() && !isspace((unsigned int)str[pos])) { pos++; } words.push_back(str.substr(word_start, pos - word_start)); num_words++; - while (pos < str.length() && isspace(str[pos])) { + while (pos < str.length() && isspace((unsigned int)str[pos])) { pos++; } } @@ -164,7 +164,7 @@ tokenize(const string &str, vector_string &words, const string &delimiters) { string trim_left(const string &str) { size_t begin = 0; - while (begin < str.size() && isspace(str[begin])) { + while (begin < str.size() && isspace((unsigned int)str[begin])) { begin++; } @@ -180,7 +180,7 @@ string trim_right(const string &str) { size_t begin = 0; size_t end = str.size(); - while (end > begin && isspace(str[end - 1])) { + while (end > begin && isspace((unsigned int)str[end - 1])) { end--; }