Skip to content

Checking Greater than or Equal to with a nil value hangs Unity. #260

@Ndemic-Jack

Description

@Ndemic-Jack

Hi,

This may, or may not, be a Unity specific issue, but I have noticed that the below line of code will freeze the editor, forcing a process kill.
local test = nil >= 5

The lua state will be running code not written by me, and so I can't guarantee someone won't write a variable name wrong, causing a nil comparison.

It seems like local test = nil > 5 works fine, and correctly throws an exception.

I am running Unity 6000.0.62f1, on Mac, with Lua-CSharp 0.5.3 retrieved via NugetForUnity.

Thanks, happy to share more info if needed.

Jack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions