summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo_util.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
index 8192436834..a3f60df7fc 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
+++ b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp
@@ -133,7 +133,8 @@ char ** y_strsplit(char * str, char * sep, int nelem)
vector = y_new(char *, nelem + 1);
- for(char *p=str, *s=strstr(p,sep); i<nelem && s; p=s+l, s=strstr(p,sep), i++) {
+ char *p, *s;
+ for(p=str, s=strstr(p,sep); i<nelem && s; p=s+l, s=strstr(p,sep), i++) {
int len = s-p;
vector[i] = y_new(char, len+1);
strncpy(vector[i], p, len);