diff --git a/sftp.c b/sftp.c index 591b60ba..3357876c 100644 --- a/sftp.c +++ b/sftp.c @@ -352,6 +352,7 @@ void sftp_register(struct sftp_request *req) struct sftp_request *sftp_find_request(struct sftp_packet *pktin) { unsigned long id; + unsigned fid; struct sftp_request *req; if (!pktin) { @@ -363,7 +364,8 @@ struct sftp_request *sftp_find_request(struct sftp_packet *pktin) fxp_internal_error("did not receive a valid SFTP packet\n"); return NULL; } - req = find234(sftp_requests, &id, sftp_reqfind); + fid = (unsigned)id; + req = find234(sftp_requests, &fid, sftp_reqfind); if (!req || !req->registered) { fxp_internal_error("request ID mismatch\n");