Fix corruption issue with string iterator was using an absolute pointer. Also adds a special relative pointer type for constructed strings on the stack.

This commit is contained in:
James Urquhart 2015-02-16 21:05:45 +00:00
parent 97ab694af8
commit 942c7a48f4
7 changed files with 151 additions and 29 deletions

View file

@ -367,6 +367,22 @@ public:
notify->trigger();
}
void setStringStackPtrValue(StringStackPtr newValue)
{
if( mIsConstant )
{
Con::errorf( "Cannot assign value to constant '%s'.", name );
return;
}
value.setStringStackPtrValue(newValue);
// Fire off the notification if we have one.
if ( notify )
notify->trigger();
}
void setStringValue(const char *newValue)
{
if( mIsConstant )
@ -495,6 +511,7 @@ public:
void setIntVariable(S32 val);
void setFloatVariable(F64 val);
void setStringVariable(const char *str);
void setStringStackPtrVariable(StringStackPtr str);
void setCopyVariable();
void pushFrame(StringTableEntry frameName, Namespace *ns);