瀏覽代碼

cmUdpPort.c : Fixed bug in cmUdpTestV() where arguments were not correctly selected from 'arv'.

master
Kevin Larke 10 年之前
父節點
當前提交
ebd1d37e74
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      cmUdpPort.c

+ 4
- 4
cmUdpPort.c 查看文件

@@ -690,11 +690,11 @@ cmUdpRC_t cmUdpTest( cmCtx_t* ctx, const char* remoteIpAddr, cmUdpPort_t port )
690 690
 
691 691
 cmUdpRC_t cmUdpTestV( cmCtx_t* ctx, unsigned argc, const char* argv[])
692 692
 {
693
-  if( argc < 3 )
694
-    return cmErrMsg(&ctx->err,kTestFailUdpRC,"cmUdpTestV usage: argv[1]=<IP Addr> argv[2]=<Socket Port Number>");
693
+  if( argc != 2 )
694
+    return cmErrMsg(&ctx->err,kTestFailUdpRC,"cmUdpTestV usage: argv[0]=<IP Addr> argv[1]=<Socket Port Number>");
695 695
 
696
-  const char* ipAddr = argv[1];
697
-  cmUdpPort_t port   = atoi(argv[2]);
696
+  const char* ipAddr = argv[0];
697
+  cmUdpPort_t port   = atoi(argv[1]);
698 698
 
699 699
   cmRptPrintf(&ctx->rpt,"UDP Test Sending To: %s port:%i\n",ipAddr,port);
700 700
 

Loading…
取消
儲存