Skip to content

Overflow problem with negative hashcode #61

@ejannink

Description

@ejannink

I have been using UniLua happily a while ago, not pivking things up again, I run into an overflowexception

It breaks in LuaTable.cs line 324 and the hashcode detexted was of a "_G" string. Clearly the (uint) cast does not accept this negative number. Changing to uint n = (uint) Math.Abs(hashcode) gives me additional problems. Any clues ?

Regards, Eelco

// LuaTable.cs line 324
private HNode GetHashNode(int hashcode)
{
uint n = (uint) hashcode;
return HashPart[n % HashPart.Length];
}

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