Fixed two bugs in the old color strip function. #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "anomaly/iw6-mod:color_strip_bug_fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have this completed as well but I haven't closed it yet because I am pretty sure there is just one bug in this function:
I have added !max check because it can happen if whoever invokes this function is not careful but I am unable to understand why the static cast is needed. isn't it fine to keep everything between signed integers like the rest of the function?
Check this out: https://godbolt.org/z/EGnofMn7q
It'd seem to me that the behavior with the cast is the intended behavior.
https://github.com/iw4x/iw4x-client/blob/develop/src/Components/Modules/TextRenderer.cpp#L1327-L1332
With the cast would also be consistent with iw4x.
Interesting, I'm glad I asked.
Okay, i played with godbolt a bit so yeah iw4x way is better as laupetin took a bit more care than the original xlabs dev when they coded this strip function
so I remove your email address as well from the commit history I hope you like your new email
completed via
199206ee5a
Pull request closed