summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rwxr-xr-xindra/llcorehttp/_httpoprequest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 8cb7fee701..ce0fc605ab 100755
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -1025,13 +1025,15 @@ char * os_strtrim(char * lstr)
}
if (*lstr)
{
- for (char * rstr(lstr + strlen(lstr)); *--rstr;)
+ char * rstr(lstr + strlen(lstr));
+ while (lstr < rstr && *--rstr)
{
if (' ' == *rstr || '\t' == *rstr)
{
*rstr = '\0';
}
}
+ llassert(lstr <= rstr);
}
return lstr;
}