mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-27 07:05:28 +03:00
Fixes #134 rh_get_mapname fixed incorrectly get length argument
This commit is contained in:
parent
c00ded59a2
commit
ec11f8ad93
@ -2270,18 +2270,17 @@ enum MapNameType { MNT_TRUE, MNT_SET };
|
||||
*/
|
||||
cell AMX_NATIVE_CALL rh_get_mapname(AMX *amx, cell *params)
|
||||
{
|
||||
enum args_e { arg_count, arg_output, arg_len, arg_type };
|
||||
enum args_e { arg_count, arg_output, arg_maxlen, arg_type };
|
||||
|
||||
cell* dest = getAmxAddr(amx, params[arg_output]);
|
||||
size_t length = *getAmxAddr(amx, params[arg_len]);
|
||||
|
||||
switch ((MapNameType)params[arg_type])
|
||||
{
|
||||
case MNT_TRUE:
|
||||
setAmxString(dest, g_szMapName, length);
|
||||
setAmxString(dest, g_szMapName, params[arg_maxlen]);
|
||||
break;
|
||||
case MNT_SET:
|
||||
setAmxString(dest, g_RehldsData->GetName(), length);
|
||||
setAmxString(dest, g_RehldsData->GetName(), params[arg_maxlen]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user