ftpserver.pl: ensure integral number usage for passive mode string
authorYang Tse <yangsita@gmail.com>
Mon, 24 Oct 2011 18:40:25 +0000 (20:40 +0200)
committerYang Tse <yangsita@gmail.com>
Mon, 24 Oct 2011 18:45:12 +0000 (20:45 +0200)
tests/ftpserver.pl

index 182511f..43bdbae 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -1111,7 +1111,7 @@ sub PASV_ftp {
             $p="1,2,3,4";
         }
         sendcontrol sprintf("227 Entering Passive Mode ($p,%d,%d)\n",
-                            ($pasvport/256), ($pasvport%256));
+                            int($pasvport/256), int($pasvport%256));
     }
     else {
         # EPSV reply