diff --git a/scan.c b/scan.c index 4911cef9..4ed66ad9 100644 --- a/scan.c +++ b/scan.c @@ -1540,7 +1540,7 @@ static int PrintCountsOrMonitors(pScanData self, SConnection *pCon, if(iWhich < 0) { GetScanCounts(self,lData,self->iNP); - snprintf(pBueffel,59,"%s.counts = {", name); + snprintf(pBueffel,59,"%s.Counts = {", name); } else { @@ -2133,6 +2133,11 @@ static int DumpScan(pScanData self, SConnection *pCon) /*---------- scan */ else if(strcmp(argv[1],"run") == 0) { + if (argc < 5) { + sprintf(pBueffel,"ERROR: not enough arguments for %s run",argv[0]); + SCWrite(pCon,pBueffel,eError); + return 0; + } /* get NP */ iRet = Tcl_GetInt(InterpGetTcl(pSics),argv[2],&lNP); if(iRet != TCL_OK) @@ -2181,6 +2186,11 @@ static int DumpScan(pScanData self, SConnection *pCon) /*---------- silent */ else if(strcmp(argv[1],"silent") == 0) { + if (argc < 5) { + sprintf(pBueffel,"ERROR: not enough arguments for %s silent",argv[0]); + SCWrite(pCon,pBueffel,eError); + return 0; + } /* get NP */ iRet = Tcl_GetInt(InterpGetTcl(pSics),argv[2],&lNP); if(iRet != TCL_OK)