Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigs cannot be initialized with another Big #22

Closed
NumbuhFour opened this issue May 24, 2023 · 1 comment
Closed

Bigs cannot be initialized with another Big #22

NumbuhFour opened this issue May 24, 2023 · 1 comment

Comments

@NumbuhFour
Copy link

NumbuhFour commented May 24, 2023

If you try to do Big.new(another_big) to copy a Big, it fails to copy over the original's values.

The _init function of Big checks m.is_class("Big") but per godotengine/godot#21789 this fails.
The return of m.get_class() does not return "Big", but returns the native class "RefCounted", so an alternative solution is required.

Repro steps:

var some_big:Big = Big.new(99)
var copy_big:Big = Big.new(some_big)

Expected: copy_big's value should be 99
Result: copy_big's value is 0

This was found in Godot4 with source pulled from both godot and GodotBigNumberClass pulled today

@ChronoDK
Copy link
Owner

Thanks, I have fixed it right away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants