Added new validation check for homeSpan.resetIID()
New value must be equal to, or greater than, the last IID value used. This prevents possible re-use.
This commit is contained in:
parent
73561328e6
commit
fe3269e9ef
|
|
@ -1594,13 +1594,15 @@ Span& Span::resetIID(int newIID){
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(newIID<1){
|
newIID--;
|
||||||
LOG0("\nFATAL ERROR! Can't reset the Accessory IID count to a value less than 1 ***\n");
|
|
||||||
|
if(newIID<Accessories.back()->iidCount){
|
||||||
|
LOG0("\nFATAL ERROR! Can't reset the Accessory IID count to a value less than already used ***\n");
|
||||||
LOG0("\n=== PROGRAM HALTED ===");
|
LOG0("\n=== PROGRAM HALTED ===");
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessories.back()->iidCount=newIID-1;
|
Accessories.back()->iidCount=newIID;
|
||||||
return(*this);
|
return(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue