mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- fixed bad conversion from FString to const char * in state label type cast.
This commit is contained in:
parent
9fab8380ff
commit
25e285b65d
1 changed files with 2 additions and 2 deletions
|
@ -1440,8 +1440,8 @@ FxExpression *FxTypeCast::Resolve(FCompileContext &ctx)
|
|||
// Right now this only supports string constants. There should be an option to pass a string variable, too.
|
||||
if (basex->isConstant() && (basex->ValueType == TypeString || basex->ValueType == TypeName))
|
||||
{
|
||||
const char *s = static_cast<FxConstant *>(basex)->GetValue().GetString();
|
||||
if (*s == 0 && !ctx.FromDecorate) // DECORATE should never get here at all, but let's better be safe.
|
||||
FString s= static_cast<FxConstant *>(basex)->GetValue().GetString();
|
||||
if (s.Len() == 0 && !ctx.FromDecorate) // DECORATE should never get here at all, but let's better be safe.
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "State jump to empty label.");
|
||||
delete this;
|
||||
|
|
Loading…
Reference in a new issue