Commit Graph

5071 Commits

Author SHA1 Message Date
IgnacioFDM
732a05dde0 Back out changes in #366 and introduce read_argv_int/float()
* Revert "Extend "read_argv" native"

This reverts commit aaa2934595.

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
Karol Szuster
ea43a61094 Update hashing library (#384) 2016-08-22 11:21:46 +02:00
Vincent Herbet
e24b9548d4 Update to the latest AMTL (#381)
* Update to latest AMTL.

* Update .gitignore for VS2015
2016-08-12 15:30:06 +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
Vincent Herbet
861011fa24 Merge pull request #375 from voed/patch-1
Fixed some natives descriptions
2016-06-14 08:52:36 +02:00
voed
575d215c77 Fixed some natives descriptions 2016-06-14 04:49:46 +03:00
Vincent Herbet
294066ca61 Merge pull request #374 from Arkshine/fix/util_replaceall
Fix UTIL_ReplaceAll not properly tracking length.
2016-06-10 15:29:33 +02:00
Arkshine
2099a88ddf Fix UTIL_ReplaceAll not properly tracking length. 2016-06-06 12:09:42 +02:00
Vincent Herbet
1662b47f7e Merge pull request #372 from Ni3znajomy/gcc6-fix-compilation
Fix compilation error for GCC 6
2016-06-05 19:51:27 +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
Karol Szuster
446a1a5108 Fix compilation error for GCC 6.1
Fix compilation error due -Wmisleading-indentation
2016-05-04 15:01:29 +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
Vincent Herbet
09e49439bc Merge pull request #370 from Arkshine/fix/cs_set_user_model
Fix a crash after cs_set_user_model is used with model_index parameter set.
2016-04-16 11:45:37 +02:00
Vincent Herbet
af0afabfa0 Merge pull request #366 from Ni3znajomy/read_argv2
Extend "read_argv" native
2016-04-15 20:29:44 +02:00
Vincent Herbet
ffa4e05708 Merge pull request #356 from Arkshine/fix/some-cstrike-natives
Fix issues with some cstrike natives
2016-04-11 11:53:35 +02:00
Vincent Herbet
ccf8026761 Merge pull request #367 from Arkshine/fix/engine-typos
Fix typos in entity_intersects() and get_global_edict2() natives
2016-04-11 11:28:19 +02:00
Arkshine
253dec94d1 Fix a crash after cs_set_user_model is used with model_index set. 2016-04-07 20:27:27 +02:00
Karol Szuster
53f9144fc3 Values by reference in forwards 2016-04-05 18:51:18 +02:00
Arkshine
d91144a10d Fix typos in entity_intersects() and get_global_edict2() natives 2016-03-31 19:37:12 +02:00
Karol Szuster
aaa2934595 Extend "read_argv" native 2016-03-28 20:05:56 +02:00
Vincent Herbet
21c4886f90 Merge pull request #365 from Ni3znajomy/fix-docs
Fix description of "set_user_info" native
2016-03-23 17:43:56 +01:00
Karol Szuster
5ad1efd698 Fix description of "set_user_info" native 2016-03-23 17:27:15 +01:00
Vincent Herbet
0bb5d86c20 Merge pull request #363 from Arkshine/update/clang-travis
Update TravisCI build to use Clang 3.7
2016-03-20 23:08:22 +01:00
Arkshine
94599e9b4e Update TravisCI build to use Clang 3.7 2016-03-20 23:02:15 +01:00
Vincent Herbet
fdebeab612 Merge pull request #361 from alliedmodders/compile-fixups
Compile fixups for Clang 3.8
2016-03-20 22:36:56 +01:00
Vincent Herbet
e6a2bc545c Merge pull request #362 from Ni3znajomy/update-message-stocks
message_stocks.inc: Cache messages id
2016-03-20 13:13:58 +01:00
Karol Szuster
5a3f4be04e message_stocks.inc: Cache messages id 2016-03-20 13:04:48 +01:00
Nicholas Hastings
79a6dc9501 Fix shift-negative-value warning on newer compiler versions.
error: shifting a negative signed value is undefined
2016-03-17 15:12:26 -04:00
Nicholas Hastings
19dd940b22 Fix pointer-bool-conversion warning on newer compiler versions.
error: address of array 'lval->sym->name' will always evaluate to 'true'
2016-03-17 15:10:55 -04: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
aa2caacf4c Replace INDEXENT and ENTINDEX by TypeConversion for consistency 2016-03-16 21:40:43 +01:00
Arkshine
ae4368a3ca Remove inline comment support in multilingual INI parser 2016-03-16 19:50:46 +01:00
Arkshine
4c7375555a Fix typo in cs_get_translated_item_alias() 2016-03-16 16:29:56 +01:00
Arkshine
28a0b0626b Fix incomplete sanity check in cs_get_weapon_info() 2016-03-16 16:29:56 +01:00
Arkshine
da2abb9c3b Fix a bcompat issue with cs_s/get_user_backpackammo() by not relying on m_rgpPlayerItems to get ammo index 2016-03-16 16:29:55 +01:00
Vincent Herbet
62a7fe0be5 Merge pull request #342 from Arkshine/feature/cs_get_item_alias
Add cs_get_item_alias(), improve cs_get_item_id() & cleanup alias datas
2016-03-16 15:15:00 +01:00
Arkshine
c3a52b366e Add cs_get_item_alias() native & cleanup alias datas 2016-03-16 12:29:33 +01:00
Vincent Herbet
d4691bb799 Merge pull request #358 from Arkshine/fix/allow-null-invoker-playbackevent
Allow null invoker to be passed in EngFunc_PlayBackEvent (bug 6467)
2016-03-16 09:57:48 +01:00
Arkshine
494444a433 Allow null invoker to be passed in EngFunc_PlayBackEvent 2016-03-02 14:55:23 +01:00
Vincent Herbet
f981aa34dc Merge pull request #355 from Arkshine/fix/typo-find_ent_in_sphere
Fix typo in find_ent_in_sphere()
2016-02-24 23:58:16 +01:00
Arkshine
c6024b93ce Fix typo in find_ent_in_sphere 2016-02-24 23:47:17 +01:00
Vincent Herbet
8d89104241 Merge pull request #350 from Arkshine/feature/inline_fmt
Add fmt() native to format and return a string inline
2016-02-23 20:09:41 +01:00
Arkshine
be06e2448b Add fmt() native to format and return inline a string 2016-02-23 19:56:02 +01:00
Vincent Herbet
f2272ab4cb Merge pull request #351 from Arkshine/fix/native-array-compilation
Fix issue where native functions returning an array would not compile
2016-02-23 19:41:43 +01:00
Arkshine
2c73268668 Fix issue where native functions returning an array would not compile 2016-02-22 23:37:09 +01:00
Vincent Herbet
f8dd3c0efd Merge pull request #354 from Arkshine/update/tfc-vtable-linux
Fix TFC virtual functions offsets under linux
2016-02-19 18:30:50 +01:00
Arkshine
141f5effa3 Fix TFC virtual functions indexes under linux 2016-02-19 17:29:21 +01:00