From: Yang Tse Date: Fri, 10 Oct 2008 02:14:46 +0000 (+0000) Subject: fix compiler warning X-Git-Tag: curl-7_19_1~189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0a48627b2976db73ec02003b1f2772018438e90;p=thirdparty%2Fcurl.git fix compiler warning --- diff --git a/lib/ftp.c b/lib/ftp.c index 3d116b5431..d940a12e01 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -1393,7 +1393,8 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn) /* chop off the file part if format is dir/dir/file */ slashPos = strrchr(lstArg,'/'); - *(slashPos+1) = '\0'; + if(slashPos) + *(slashPos+1) = '\0'; } }