Fix invalid collection length for dummy unit collection
While this didn't show up as a bug, if this length was used it could result in an out of bounds read.
This commit is contained in:
parent
887570065f
commit
5e2b8c43e4
|
@ -137,7 +137,7 @@ struct bUnitCollection {
|
|||
|
||||
/* Dummy */
|
||||
static bUnitDef buDummyDef[] = { {"", nullptr, "", nullptr, nullptr, nullptr, 1.0, 0.0}, NULL_UNIT};
|
||||
static bUnitCollection buDummyCollection = {buDummyDef, 0, 0, sizeof(buDummyDef)};
|
||||
static bUnitCollection buDummyCollection = {buDummyDef, 0, 0, UNIT_COLLECTION_LENGTH(buDummyDef)};
|
||||
|
||||
|
||||
/* Lengths. */
|
||||
|
|
Loading…
Reference in New Issue