-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Version: 0.7-dev (Last Build 2021-01-28 01:30)
Description of the problem:
Negative operations such as -42 are not correctly handled.
Steps to reproduce:
See code.
Code:
Source Code
func _ready():
var f = File.new()
f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42).Output
[codeblocks]
[gdscript]
func _ready():
var f = File.new()
f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42).
[/gdscript]
[csharp]
public override void _Ready()
{
var f = new File();
f.Store16() - 42); // This wraps around and stores 65494 (2^16 - 42).
}
[/csharp]
[/codeblocks]Expected Output
public override void _Ready()
{
var f = new File();
f.Store16(-42); // This wraps around and stores 65494 (2^16 - 42).
}Warnings
[1] No return value provided. Assuming void. Use -> RETVAL to specify
[3] If constant is enum refer to documentation for correct syntax.
Reactions are currently unavailable