Skip to content

Add textdraw font boundary #736

Closed
Closed

Description

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

Activity

  1. AmyrAhmady commented on Oct 12, 2023

    @AmyrAhmady
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions