Skip to content

Fix float value NAN still shown as 0 in the debugger and inspector.#115013

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
neclor:fix-nan-shown-as-0
May 11, 2026
Merged

Fix float value NAN still shown as 0 in the debugger and inspector.#115013
Repiteo merged 1 commit into
godotengine:masterfrom
neclor:fix-nan-shown-as-0

Conversation

@neclor
Copy link
Copy Markdown
Contributor

@neclor neclor commented Jan 16, 2026

Problem

Despite issue #88006 being closed, 0.0 still being displayed instead of NAN.
This happens because while PR #105911 allowed non-finite values, it missed handling them properly. As a result, the _snapped_r128 function called in Range::set_value() returns 0 anyway when encountering them.
After adding a proper NaN check, everything displays correctly.

Issue

Fixes #114996
Fixes #115525

@neclor neclor requested a review from a team as a code owner January 16, 2026 00:09
@AThousandShips AThousandShips added bug topic:editor cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release labels Jan 16, 2026
@AThousandShips AThousandShips added this to the 4.x milestone Jan 16, 2026
Copy link
Copy Markdown
Contributor

@Kaleb-Reid Kaleb-Reid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wasted an hour a few days ago due to this bug. Tested the changes and they appear to work. Code looks good to me.

@Shrotladd
Copy link
Copy Markdown

Any chance of getting this approved?

@KoBeWi KoBeWi modified the milestones: 4.x, 4.7 May 11, 2026
@KoBeWi KoBeWi requested a review from aaronfranke May 11, 2026 17:58
@Repiteo Repiteo merged commit a2c17bd into godotengine:master May 11, 2026
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented May 11, 2026

Thanks! Congratulations on your first merged contribution! 🎉

@neclor neclor deleted the fix-nan-shown-as-0 branch May 12, 2026 08:34
@Repiteo Repiteo removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.6 Considered for cherry-picking into a future 4.6.x release topic:editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A [nan,nan] position is displayed by the editor as [-99999,-99999] Float values NAN or INF are still shown as 0 in the debugger and inspector

6 participants