DrawMarker causing crash when you enter a string as type instead of a integer

I randomly found this bug at like 4am when i was working on a script for a friend

  1. Client: canary; FXVersion: 5848
  2. To get a error or smth took a bit to find the problem
  3. Game crash
  4. Native
  5. Client example code that causes this crash:
CreateThread(function()
    while true do
        DrawMarker("crash", 1693.0, 4822.0, 42.0, 0, 0, 0, 0, 0, 0, 1.0, 1.0, 1.0, 255, 0, 0, 200, false, true, 2, false, nil, nil, false)
        Wait(0)
    end
end)

Screenshot of the crashcode:
image

1 Like

TBF it’s clearly marked that it needs to be an integer in the natives reference, I don’t see this being an “actual bug”, although pretty weird - I don’t recall a lot of natives causing a crash like that for passing the wrong data type to it.

1 Like

A string passed as an integer transforms into a large integer, which is an invalid index for a marker type. I will fix it soon. The game shouldn’t crash when you call a native, even if it was called with invalid arguments.

2 Likes

Created a pull request with the fix:

2 Likes