You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*
* FtpPwd - get working directory at remote
*
* return 1 if successful, 0 otherwise
*/
int ftplib::Pwd(char *path, int max)
{
int l = max;
char *b = path;
char *s;
if (!FtpSendCmd("PWD",'2',mp_ftphandle)) return 0;
s = strchr(mp_ftphandle->response, '"');
if (s == NULL) return 0;
s++;
while ((--l) && (*s) && (*s != '"')) *b++ = *s++;
*b++ = '\0'; // !!!! This causes a warning
return 1;
}
Proposed fix:
*
* FtpPwd - get working directory at remote
*
* return 1 if successful, 0 otherwise
*/
int ftplib::Pwd(char *path, int max)
{
int l = max;
char *b = path;
char *s;
if (!FtpSendCmd("PWD",'2',mp_ftphandle)) return 0;
s = strchr(mp_ftphandle->response, '"');
if (s == NULL) return 0;
s++;
while ((--l) && (*s) && (*s != '"')) *b++ = *s++;
*b = '\0';
return 1;
}
The text was updated successfully, but these errors were encountered:
Proposed fix:
The text was updated successfully, but these errors were encountered: