aggiunto controllo vettore counters x evitare crash in copia array...

This commit is contained in:
Samuele E. Locatelli
2017-07-24 15:58:00 +02:00
parent 40a3735bfe
commit 8c2d201425
+12 -12
View File
@@ -3352,7 +3352,7 @@ namespace MTC_Adapter
catch
{
}
if (numero > 0)
if (numero > 0 && istCounters.Length >= numero)
{
//istCounters[numero - 1] = tabDatiMtz[i];
istCounters[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
@@ -3368,7 +3368,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && vettPath.Length >= numero)
{
vettPath[numero - 1].mPathPartCount.Value = tabDatiMtz[i];
}
@@ -3384,7 +3384,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istDistMovAssi.Length >= numero)
{
istDistMovAssi[numero - 1] = tabDatiMtz[i];
}
@@ -3397,7 +3397,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istNumInvAssi.Length >= numero)
{
// 2016.07.06 debug di valori che potrebbero essere nulli...
try
@@ -3420,7 +3420,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istAccTimeAssi.Length >= numero)
{
// 2016.07.06 debug di valori che potrebbero essere nulli...
try
@@ -3446,7 +3446,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istGiriElettrom.Length >= numero)
{
istGiriElettrom[numero - 1] = tabDatiMtz[i];
}
@@ -3459,7 +3459,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istNumCambiUt.Length >= numero)
{
istNumCambiUt[numero - 1] = tabDatiMtz[i];
}
@@ -3475,7 +3475,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istVacPumpWrkTime.Length >= numero)
{
istVacPumpWrkTime[numero - 1] = tabDatiMtz[i];
}
@@ -3491,7 +3491,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istVacActCount.Length >= numero)
{
istVacActCount[numero - 1] = tabDatiMtz[i];
}
@@ -3507,7 +3507,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istLubroCount.Length >= numero)
{
istLubroCount[numero - 1] = tabDatiMtz[i];
}
@@ -3523,7 +3523,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istSlittaMag.Length >= numero)
{
istSlittaMag[numero - 1] = tabDatiMtz[i];
}
@@ -3539,7 +3539,7 @@ namespace MTC_Adapter
}
catch
{ }
if (numero > 0)
if (numero > 0 && istProtMag.Length >= numero)
{
istProtMag[numero - 1] = tabDatiMtz[i];
}