mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix out of range enum casts in deSerialize functions (#14090)
This commit is contained in:
parent
0383c44f0d
commit
2ea8d9ca11
15 changed files with 138 additions and 77 deletions
|
@ -92,7 +92,7 @@ void PointedThing::deSerialize(std::istream &is)
|
|||
int version = readU8(is);
|
||||
if (version != 0) throw SerializationError(
|
||||
"unsupported PointedThing version");
|
||||
type = (PointedThingType) readU8(is);
|
||||
type = static_cast<PointedThingType>(readU8(is));
|
||||
switch (type) {
|
||||
case POINTEDTHING_NOTHING:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue