Browse Source

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

master
Kevin Larke 10 years ago
parent
commit
ebd1d37e74
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      cmUdpPort.c

+ 4
- 4
cmUdpPort.c View File

690
 
690
 
691
 cmUdpRC_t cmUdpTestV( cmCtx_t* ctx, unsigned argc, const char* argv[])
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
   cmRptPrintf(&ctx->rpt,"UDP Test Sending To: %s port:%i\n",ipAddr,port);
699
   cmRptPrintf(&ctx->rpt,"UDP Test Sending To: %s port:%i\n",ipAddr,port);
700
 
700
 

Loading…
Cancel
Save