Clan tags + ConVar/NeoUI UTF-8 bytes truncation#682
Merged
Conversation
nullsystem
force-pushed
the
GH-267_Clantag
branch
5 times, most recently
from
October 18, 2024 19:29
0e467af to
d61f8b4
Compare
nullsystem
marked this pull request as ready for review
October 18, 2024 19:29
brysondev
previously approved these changes
Oct 19, 2024
Rainyan
requested changes
Oct 22, 2024
nullsystem
force-pushed
the
GH-267_Clantag
branch
from
October 23, 2024 19:18
d61f8b4 to
829993a
Compare
brysondev
previously approved these changes
Oct 23, 2024
Rainyan
reviewed
Oct 23, 2024
Member
There was a problem hiding this comment.
If there's any reasonable way we can deal with this assertion being hit more gracefully, it would be nice:
] neo_clantag "ああああ"
// When opening the scoreboard with the clantag set:
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
strtools_unicode.cpp (290) : invalid Unicode byte sequence
I'm guessing it's another case of a multibyte character getting cut due to running out of bytes in the allocated buffer.
Collaborator
Author
|
I'm think there's a need to try to restrict the convar string length properly by either callback function or expanding it, but also changing a bit on length checking for the NeoUI text edit. Also a neo_name issue as well from the seems of it. |
nullsystem
force-pushed
the
GH-267_Clantag
branch
from
October 24, 2024 21:19
829993a to
47c2440
Compare
nullsystem
marked this pull request as draft
October 24, 2024 21:19
nullsystem
force-pushed
the
GH-267_Clantag
branch
from
October 24, 2024 22:17
47c2440 to
66c0241
Compare
nullsystem
marked this pull request as ready for review
October 24, 2024 22:17
Collaborator
Author
|
@Rainyan I've added in callbacks for neo_name + neo_clantag to truncate the string when too long, and also altered NeoUI text edit to limit by bytes when it's in char rather than wchar_t length. |
* Be able to set it from the settings * Networked clan tag via the gamerules, updates only when necessary * Scoreboard: If all players have the clantag, the team name gets replaced by it * Friendly markers: Also shows in here but with an extra toggle to either only show for spectator or for all people * NeoUI - TextEdit limit by the bytes in char UTF-8, NOT wchar_t length * Callback added for neo_name and neo_clantag to truncate strings that are too long * fixes NeotokyoRebuild#267
nullsystem
force-pushed
the
GH-267_Clantag
branch
from
October 24, 2024 22:37
66c0241 to
772df80
Compare
brysondev
approved these changes
Oct 24, 2024
Rainyan
approved these changes
Oct 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
[CLANTAG]to the player's nameneo_nameandneo_clantagto truncate by expected bytesNeoUItext edit changed fromwchar_tsize limit to conversion-resultingchar/UTF-8 bytes limitToolchain
Linked Issues