1347 Commits

Author SHA1 Message Date
souvikdas95
a7c3e34fbe Fix Warning from MSVC: 'Double to Float precision loss' (#402) 2017-01-21 20:58:33 +01:00
souvikdas95
a30172f8a6 Fix UTF-8 character parsing due to improper casting (#401)
Upcasting of -ve signed characters (char) to signed integers (cell) results in -ve signed integers which don't represent valid printable characters.
eg. UTF-8 Character '中' (0xE4 0xB8 0xAD) when casted results in 0xFFFFFFE4 0xFFFFFFB8 0xFFFFFFAD which are not valid printable characters.
2017-01-17 15:50:00 +01:00
Karol Szuster
79d9fc530d Update AMTL (#390) 2016-12-31 23:49:46 +01:00
Karol Szuster
e3ae451c09 Add missing format param (#391) 2016-11-25 11:26:58 +01:00
IgnacioFDM
732a05dde0 Back out changes in #366 and introduce read_argv_int/float()
* Revert "Extend "read_argv" native"

This reverts commit aaa2934595379c371513cb9dd23de8f3c5e16d93.

This broke binary compatibility with either older, already compiled
plugins, or newly compiled plugins if you forgot to update .inc headers.

This happened because read_argv used to receive maxlen by value, and
after
this commit it receives it by reference. This causes read_argv either
to fail, or worse, to buffer overflow, resulting in a security vulnerability.

Newly introduced functionality for read_argv should be added with a new,
separate native.

* Add "read_argv_int" & "read_argv_float" natives
2016-08-31 20:34:02 +02:00
Alexander Petrov
a9557fe53d Use exponentiation by squaring instead of n-times multiplications in power() (#385) 2016-08-27 10:12:02 +02:00
IgnacioFDM
b9997eb628 Fix a floatround bug (#376)
* Fix floatround overflow

floatround would overflow for floats greater than 2^30 because internally
it would double the number (therefore anything greater than 2^30 results
in something greater than 2^31 which would cause overflow of course)

floatround behaviour is left exactly identical otherwise (although I find
it very weird and wrong to deliberately avoid banker's rounding, it would
be a bad idea to change this behaviour due to compatibility)

Remember to reassemble amxexecn and amxjitsn

* Update the compiled object files
2016-06-27 12:23:08 +02:00
KliPPy
a53e7905db Extend amxx list command (#377) 2016-06-26 14:04:33 +02:00
Arkshine
2099a88ddf Fix UTIL_ReplaceAll not properly tracking length. 2016-06-06 12:09:42 +02:00
Vincent Herbet
f3c58b7cd6 Merge pull request #369 from Ni3znajomy/forwards/value-by-reference
Values by reference in forwards
2016-06-05 19:50:40 +02:00
Vincent Herbet
2628ce8664 Merge pull request #349 from Arkshine/feature/command-ml
Add a param to register_*cmd() and get_*cmd() to indiquate info is a multilingual key + modify plugin
2016-04-16 13:12:21 +02:00
Arkshine
9054643fe8 Add a param to register_*cmd() and get_*cmd() to indiquate info is a multilingual key + modify plugin 2016-04-16 11:56:49 +02:00
Karol Szuster
53f9144fc3 Values by reference in forwards 2016-04-05 18:51:18 +02:00
Karol Szuster
aaa2934595 Extend "read_argv" native 2016-03-28 20:05:56 +02:00
Vincent Herbet
7522403da8 Merge pull request #344 from Arkshine/fix/iniparser-inline-comment
Remove inline comment support in multilingual INI parser (bug 6476)
2016-03-16 23:57:28 +01:00
Arkshine
ae4368a3ca Remove inline comment support in multilingual INI parser 2016-03-16 19:50:46 +01:00
Arkshine
be06e2448b Add fmt() native to format and return inline a string 2016-02-23 19:56:02 +01:00
Vincent Herbet
9fb72a896d Merge pull request #334 from Arkshine/move-dropclient-detour
Enable detours in ServerActivate to avoid sig conflict with third-party AMXX modules
2016-02-10 19:06:19 +01:00
Vincent Herbet
2a90fc0fe8 Merge pull request #336 from Arkshine/update/gameconfigs
Update GameConfig
2016-02-09 11:27:10 +01:00
Arkshine
696d842b07 Add info message when loading custom gamedata 2016-02-09 11:19:35 +01:00
Arkshine
78619d3710 Fix LookupLangKey retrieving invalid index 2016-02-01 14:48:32 +01:00
Vincent Herbet
06290483da Merge pull request #337 from Ni3znajomy/cvar_directset
Move Cvar_DirectSet to gamedata
2016-01-22 01:25:21 +01:00
Karol Szuster
0e8d876c5d Move Cvar_DirectSet to gamedata 2016-01-21 23:50:07 +01:00
Vincent Herbet
60ebc444ab Merge pull request #338 from Arkshine/fix/client_print_color
Improve client_print_color by inserting default color code at the start of string
2016-01-16 14:13:22 +01:00
Vincent Herbet
307dab47c8 Merge pull request #326 from Arkshine/feature/enable-disable-logevent
Add enable/disable_logevent() natives
2016-01-16 12:18:59 +01:00
Vincent Herbet
a64dbe0268 Merge pull request #331 from Arkshine/fix/buffer-oob
Fix an out of bound buffer index
2016-01-16 12:17:29 +01:00
Arkshine
240c81e626 Improve client_print_color by inserting default color code at the start of string 2016-01-16 12:09:13 +01:00
Arkshine
33768740fa Fix LoadGameConfigFile returning valid handle on invalid path 2016-01-15 17:35:21 +01:00
Arkshine
f1a2a00d38 Allow gameconfig without master for convenience 2016-01-15 17:33:42 +01:00
Arkshine
e634e512c8 Fix recursion issue with show_menu and newmenus 2016-01-15 12:56:16 +01:00
Arkshine
98fb03dd30 Enable detours in ServerActivate to avoid sig conflict with third-party AMXX modules 2016-01-11 23:25:02 +01:00
Arkshine
4662109980 Fix an out of bound buffer index 2016-01-07 19:42:47 +01:00
WPMGPRoSToTeMa
48d7a04c73 SELinux compatibility: memalign -> mmap 2016-01-03 21:38:31 +03:00
Arkshine
b0e5e8d331 Fix typo in replace_stringex native 2015-12-24 19:12:55 +01:00
Arkshine
17a31b75d7 Add enable/disable_logevent() natives 2015-12-24 19:08:00 +01:00
Vincent Herbet
ac37f8053b Merge pull request #320 from Arkshine/fix/l-translation-specifier
Fix incorrect translation language for %l format identifier
2015-12-24 15:54:28 +01:00
Karol Szuster
62a5c54a18 Add client_connectex & extend client_authorized forward 2015-12-22 16:36:51 +01:00
Arkshine
6a18f8007d Fix incorrect translation language for %l format identifier 2015-12-13 20:02:13 +01:00
Arkshine
cc9f679a85 Enable hook detour on cvar with bounds regardless current value 2015-12-11 10:33:54 +01:00
Th3-822
578a2f9852 Fix strncmp case sensitivity
strncmp was using case insensitive call when ignorecase == false
2015-12-02 19:08:10 -04:30
Arkshine
02ac6fa2d7 Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-23 14:45:07 +01:00
Arkshine
ffe8b7761e Cstrike: Move CSW_* constants from amxconst.inc to cstrike_const.inc 2015-11-03 10:45:49 +01:00
IgnacioFDM
b78c239395 Remove extra semicolon 2015-10-20 05:34:18 -03:00
Arkshine
42fb860077 Fix a potential crash if SV_DropClient address could not be found 2015-10-15 12:50:58 +02:00
Arkshine
9bee1f7edf Consistency: Replace GETEDICT with HLTypeConversion in core 2015-10-08 19:36:42 +02:00
Arkshine
9980b7ac62 Fix some natives relying on a known engine bug related to last player's edict being invalid 2015-10-06 17:19:01 +02:00
Arkshine
c29eabec50 Fix max length inconsistencies + typo 2015-10-05 19:12:30 +02:00
Arkshine
138b9e1510 Remove UTIL_Format() and UTIL_VarArgs() 2015-10-05 19:12:08 +02:00
Arkshine
f22dc769f4 Replace some LibraySys usage with AMTL primitives 2015-10-02 23:22:22 +02:00
Arkshine
f976861e21 Fix AMBuild and VS projects files 2015-10-02 23:22:22 +02:00