Fix: [Script] Access to enum/consts defined outside of main.nut (#14176)

This commit is contained in:
Loïc Guilloux
2025-05-01 18:16:32 +02:00
committed by GitHub
parent 1f212e6f2a
commit 41b113840a
4 changed files with 21 additions and 5 deletions

View File

@@ -1253,7 +1253,8 @@ bool SQVM::Get(const SQObjectPtr &self,const SQObjectPtr &key,SQObjectPtr &dest,
if(fetchroot) {
if(_rawval(STK(0)) == _rawval(self) &&
type(STK(0)) == type(self)) {
return _table(_roottable)->Get(key,dest);
if (_table(_roottable)->Get(key,dest)) return true;
return _table(_ss(this)->_consts)->Get(key,dest);
}
}
return false;