projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0596c6d
)
* the memmove off by one, and some more optimization.
author
Wilfried Göesgens
<willi@citadel.org>
Thu, 5 Jul 2007 20:05:37 +0000
(20:05 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Thu, 5 Jul 2007 20:05:37 +0000
(20:05 +0000)
webcit/tools.c
patch
|
blob
|
history
diff --git
a/webcit/tools.c
b/webcit/tools.c
index 7964064f4a8c495e54152db9afc5344aa3bbc81e..ff11a586b332d6d2e4df93bff7c2b2f8848b3d02 100644
(file)
--- a/
webcit/tools.c
+++ b/
webcit/tools.c
@@
-120,7
+120,9
@@
void remove_token(char *source, int parmnum, char separator)
return;
}
- for (i = 0; i < slen; ++i) {
+ for (i = 0;
+ ( (i < slen) && (end == -1) );
+ ++i) {
if ((start < 0) && (curr_parm == parmnum)) {
start = i;
}
@@
-135,9
+137,9
@@
void remove_token(char *source, int parmnum, char separator)
}
if (end < 0)
- end = s
trlen(source)
;
+ end = s
len
;
- memmove(&source[start], &source[end], slen - end);
+ memmove(&source[start], &source[end], slen - end
+ 1
);
}