mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-23 19:20:56 +00:00
remote local variable access was always using variable with index 1 instead of the index specified by the access request (Fixes #1739)
This commit is contained in:
parent
736ab76f68
commit
52f6a2ec7b
@ -111,7 +111,7 @@ namespace MWScript
|
||||
const std::string& name, char type) const
|
||||
{
|
||||
int index = MWBase::Environment::get().getScriptManager()->getLocals (scriptId).
|
||||
search (type, name);
|
||||
searchIndex (type, name);
|
||||
|
||||
if (index!=-1)
|
||||
return index;
|
||||
|
@ -15,8 +15,6 @@ namespace Compiler
|
||||
std::vector<std::string> mLongs;
|
||||
std::vector<std::string> mFloats;
|
||||
|
||||
int searchIndex (char type, const std::string& name) const;
|
||||
|
||||
std::vector<std::string>& get (char type);
|
||||
|
||||
public:
|
||||
@ -27,9 +25,11 @@ namespace Compiler
|
||||
int getIndex (const std::string& name) const;
|
||||
///< return index for local variable \a name (-1: does not exist).
|
||||
|
||||
bool search (char type, const std::string& name) const;
|
||||
|
||||
/// Return index for local variable \a name of type \a type (-1: variable does not
|
||||
/// exit).
|
||||
bool search (char type, const std::string& name) const;
|
||||
int searchIndex (char type, const std::string& name) const;
|
||||
|
||||
const std::vector<std::string>& get (char type) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user