projects
/
cobramush.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b33f5d
)
Fixed a potential crash bug in trim_space_sep
author
Ari Johnson
<ari@cobramush.org>
Tue, 4 Sep 2007 04:52:38 +0000
(
04:52
+0000)
committer
Ari Johnson
<ari@cobramush.org>
Tue, 4 Sep 2007 04:52:38 +0000
(
04:52
+0000)
src/strutil.c
patch
|
blob
|
history
diff --git
a/src/strutil.c
b/src/strutil.c
index 4eaa680d5b3f92fd4b54fd3bafe4ecd7cf03ebbe..cdb0713c61d721948b8aa24a6f183af2d6751a48 100644
(file)
--- a/
src/strutil.c
+++ b/
src/strutil.c
@@
-1017,7
+1017,7
@@
trim_space_sep(char *str, char sep)
str += strspn(str, " ");
for (p = str; *p; p++) ;
/* And trailing */
- for (p--; (
*p == ' ') && (p > str
); p--) ;
+ for (p--; (
p > str) && (*p == ' '
); p--) ;
p++;
*p = '\0';
return str;