Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add textdraw font boundary #736

Closed
mysy00 opened this issue Oct 12, 2023 · 1 comment
Closed

Add textdraw font boundary #736

mysy00 opened this issue Oct 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mysy00
Copy link

mysy00 commented Oct 12, 2023

Describe the bug
Server doesn't check if given font in TextDrawFont (I assume it's the same for per player textdraws) is a valid font and providing one that's greater than 16 crashes the SA:MP client.

To Reproduce
Create a textdraw and set its font to a value that's greater than 16.
I used this one for a quick test: https://tutplusplus.blogspot.com/2010/11/samp-scripting-tutorial-create-textdraw.html

Expected behavior
Check the boundaries and in case they are invalid, show a message in the console and don't apply any action.
The function should also return false to indicate it failed.

Screenshots and/or logs
If applicable, add screenshots and/or log output to help explain your problem.

Release version
RC2

@mysy00 mysy00 added the bug Something isn't working label Oct 12, 2023
AmyrAhmady added a commit that referenced this issue Oct 12, 2023
to prevent client crash, issue: #736
@AmyrAhmady
Copy link
Member

Fixed in #737
The behavior now is if you use a textdraw font higher than or equal to 16, or lower than 0, it falls back to textdraw font 0, and still returns true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants