From 8f30e44234884d88f4df56c34afc0305b1a8c3aa Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Wed, 31 Oct 2001 00:36:51 +0000 Subject: [PATCH] fix trim_blanks bug --- dtool/src/cppparser/cppPreprocessor.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 6b4c8addab..847eec4b60 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -63,6 +63,9 @@ static string trim_blanks(const string &str) { size_t first, last; + if(str.empty()) + return str; + first = 0; while (first < str.length() && isspace(str[first])) { first++;