mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 23:05:37 +03:00
Fix a buffer issue in server_changelevel forward caused by engine_changelevel native (#503)
This commit is contained in:
parent
98ab26671c
commit
a9ce39dee0
@ -2615,11 +2615,11 @@ static cell AMX_NATIVE_CALL change_task(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL engine_changelevel(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL engine_changelevel(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
const char* new_map = get_amxstring(amx, params[1], 0, length);
|
ke::AString new_map(get_amxstring(amx, params[1], 0, length));
|
||||||
|
|
||||||
// Same as calling "changelevel" command but will trigger "server_changelevel" AMXX forward as well.
|
// Same as calling "changelevel" command but will trigger "server_changelevel" AMXX forward as well.
|
||||||
// Filling second param will call "changelevel2" command, but this is not usable in multiplayer game.
|
// Filling second param will call "changelevel2" command, but this is not usable in multiplayer game.
|
||||||
g_pEngTable->pfnChangeLevel(new_map, NULL);
|
g_pEngTable->pfnChangeLevel(new_map.chars(), NULL);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user