Skip to content

Commit e9b81e3

Browse files
committed
usage of sizeof
1 parent 699d44a commit e9b81e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

a_samp.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ native GetActorPoolSize();
653653
/// <remarks>This function was added in <b>SA-MP 0.3.7-R1</b> and will not work in earlier versions!</remarks>
654654
/// <remarks>The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. </remarks>
655655
/// <remarks>The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. </remarks>
656-
native SHA256_PassHash(const password[], const salt[], ret_hash[], ret_hash_len); // SHA256 for password hashing
656+
native SHA256_PassHash(const password[], const salt[], ret_hash[], ret_hash_len = sizeof ret_hash_len); // SHA256 for password hashing
657657

658658
// Server wide persistent variable system (SVars)
659659

@@ -772,7 +772,7 @@ native GetSVarsUpperIndex();
772772
/// <seealso name="GetSVarInt"/>
773773
/// <seealso name="GetSVarFloat"/>
774774
/// <seealso name="GetSVarString"/>
775-
native GetSVarNameAtIndex(index, ret_varname[], ret_len);
775+
native GetSVarNameAtIndex(index, ret_varname[], ret_len = sizeof ret_varname);
776776

777777
/// <summary>Gets the type (integer, float or string) of a server variable.</summary>
778778
/// <param name="varname">The name of the server variable to get the type of</param>
@@ -1158,8 +1158,8 @@ native IsPlayerNPC(playerid);
11581158
native AddCharModel(baseid, newid, const dffname[], const txdname[]);
11591159
native AddSimpleModel(virtualworld, baseid, newid, const dffname[], const txdname[]);
11601160
native AddSimpleModelTimed(virtualworld, baseid, newid, const dffname[], const txdname[], timeon, timeoff);
1161-
native FindModelFileNameFromCRC(crc, retstr[], retstr_size);
1162-
native FindTextureFileNameFromCRC(crc, retstr[], retstr_size);
1161+
native FindModelFileNameFromCRC(crc, retstr[], retstr_size = sizeof retstr);
1162+
native FindTextureFileNameFromCRC(crc, retstr[], retstr_size = sizeof retstr);
11631163
native RedirectDownload(playerid, const url[]);
11641164

11651165
// Admin
@@ -1528,7 +1528,7 @@ native NetStats_ConnectionStatus(playerid);
15281528
/// <seealso name="NetStats_PacketLossPercent"/>
15291529
/// <seealso name="NetStats_ConnectionStatus"/>
15301530
/// <remarks>This function was added in <b>SA-MP 0.3z</b> and will not work in earlier versions!</remarks>
1531-
native NetStats_GetIpPort(playerid, ip_port[], ip_port_len);
1531+
native NetStats_GetIpPort(playerid, ip_port[], ip_port_len = sizeof ip_port);
15321532

15331533
// Menu
15341534

0 commit comments

Comments
 (0)