mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix trim_blanks bug
This commit is contained in:
parent
a6d4fe0c07
commit
8f30e44234
@ -63,6 +63,9 @@ static string
|
|||||||
trim_blanks(const string &str) {
|
trim_blanks(const string &str) {
|
||||||
size_t first, last;
|
size_t first, last;
|
||||||
|
|
||||||
|
if(str.empty())
|
||||||
|
return str;
|
||||||
|
|
||||||
first = 0;
|
first = 0;
|
||||||
while (first < str.length() && isspace(str[first])) {
|
while (first < str.length() && isspace(str[first])) {
|
||||||
first++;
|
first++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user