Add workaround for issue #1292

This commit is contained in:
James Urquhart 2015-05-15 12:27:52 +01:00 committed by Daniel Buckmaster
parent 7a54e300e3
commit d9436e65c5
3 changed files with 67 additions and 29 deletions

View file

@ -186,19 +186,20 @@ public:
fval = 0;
sval = typeValueEmpty;
bufferLen = 0;
type = TypeInternalString;
type = TypeInternalString;
}
void cleanup()
{
if (type <= TypeInternalString &&
sval != typeValueEmpty && type != TypeInternalStackString && type != TypeInternalStringStackPtr)
if (bufferLen > 0)
{
dFree(sval);
bufferLen = 0;
}
sval = typeValueEmpty;
type = ConsoleValue::TypeInternalString;
ival = 0;
fval = 0;
bufferLen = 0;
}
};