You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Fix duplicate minus in print output.
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
This commit is contained in:
@@ -5262,7 +5262,11 @@ String String::sprintf(const Span<Variant> &values, bool *error) const {
|
||||
// Get basic number.
|
||||
String str;
|
||||
if (!as_unsigned) {
|
||||
str = String::num_int64(Math::abs(value), base, capitalize);
|
||||
if (value == INT64_MIN) { // INT64_MIN can't be represented as positive value.
|
||||
str = String::num_int64(value, base, capitalize).trim_prefix("-");
|
||||
} else {
|
||||
str = String::num_int64(Math::abs(value), base, capitalize);
|
||||
}
|
||||
} else {
|
||||
uint64_t uvalue = *((uint64_t *)&value);
|
||||
// In unsigned hex, if the value fits in 32 bits, trim it down to that.
|
||||
|
||||
Reference in New Issue
Block a user