Skip to content

dictionary.get will edit value when passing int instead of int64 #70

Description

@Fort-TM

Discovered while coding for Openplanet. When running code like this

dictionary MyDictionary;

void Main() {
	int value = -1;
	bool found = MyDictionary.Get("MyKey", value);

	print("Found: " + found);
	print("Value: " + value);
}

The value returned will be edited sometimes

[   ScriptRuntime] [  LOG] [23:13:14] [Test]  Found: false
[   ScriptRuntime] [  LOG] [23:13:14] [Test]  Value: -1255002180
[   ScriptRuntime] [  LOG] [23:13:16] [Test]  Found: false
[   ScriptRuntime] [  LOG] [23:13:16] [Test]  Value: -2083188824

This doesn't happen when using int64 instead, but I'm reporting it just in case. Feel free to close if this is out of scope 👍

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions