You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into this and was confused on why this is the behavior.
I would expect it to only scan for null up to the length ask for.
Not sure what it should do though if it doesn't encounter one.
Put null on the last character?
@SpicerXD I'm afraid I can't see the issue, it gets the textLength of provided text to verify the following parameters do not go out of that range, it's just a security check.
raysan5
changed the title
TextSubText recieves a length but scans forever for a null terminator.
[rtext] TextSubText() receives a length but scans forever for a null terminator
Jun 12, 2024
Reviewed the function and I can't see the issue, please provided a more detailed description and an error code sample that illustrates the issue if it persists.
(This is @SpicerXD, I'm just on a work account.)
Sorry, I'll be more clear.
TextSubText can be given a position and a length.
But it will first call TextLength on that source text. Which will scan for a null or segfault if it doesn't find one.
I think it'd be safer if the length check in TextSubText instead only checked for null up to position + length.
Ran into this and was confused on why this is the behavior.
I would expect it to only scan for null up to the length ask for.
Not sure what it should do though if it doesn't encounter one.
Put null on the last character?
Source
The text was updated successfully, but these errors were encountered: