mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 03:31:40 +00:00
GRIM: Initialize Lua value even for Nil to avoid uninit values
In practice shouldn't matter, but just to avoid having uninitialized values around, we should set the value-field, even for Nil. Fixes COVERITY: 1470689
This commit is contained in:
parent
1eb48aa90a
commit
a18212b4d4
@ -78,6 +78,8 @@ void LuaObjects::add(const char *str) {
|
||||
void LuaObjects::addNil() {
|
||||
Obj obj;
|
||||
obj._type = Obj::Nil;
|
||||
// Just set a value to avoid having uninitialized fields.
|
||||
obj._value.object = nullptr;
|
||||
_objects.push_back(obj);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user