Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ispacked fix #102

Merged
merged 1 commit into from
Oct 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions fixes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,18 @@ in the output code.
* <post href="http://pro-pawn.ru/showthread.php?13466&amp;p=72954#post72954" />
* </fix>
*
* <fix name="ispacked">
* <problem>
* Returns false when the string is packed and starts with a symbol with code 128 and above.
* </problem>
* <solution>
* Check the string manually.
* </solution>
* <see>FIXES_ispacked</see>
* <author href="https://github.com/Daniel-Cortez" >Daniel_Cortez</author>
* <author href="https://github.com/VVWVV" >VVWVV</author>
* </fix>
*
* <fix name="PassengerSeating">
* <problem>
* Teleporting player to passenger seat after delay.
Expand Down Expand Up @@ -2703,6 +2715,13 @@ in the output code.
#define FIX_tolower (2)
#endif

#if !defined FIX_ispacked
#define FIX_ispacked (1)
#elseif _FIXES_IS_UNSET(FIX_ispacked)
#undef FIX_ispacked
#define FIX_ispacked (2)
#endif

#if !defined FIX_PassengerSeating
#define FIX_PassengerSeating (1)
#elseif _FIXES_IS_UNSET(FIX_PassengerSeating)
Expand Down Expand Up @@ -11537,6 +11556,29 @@ native BAD_tolower(c) = tolower;
#define tolower( FIXES_tolower(
#endif

/**
* <fixes>ispacked</fixes>
*/

#if defined _ALS_ispacked
#error _ALS_ispacked defined
#endif
native bool:BAD_ispacked(const string[]) = ispacked;

/**
* <fixes>ispacked</fixes>
*/

#if FIX_ispacked
stock bool:FIXES_ispacked(const string[])
{
return (string[0] & ~0xFF) != 0;
}

#define _ALS_ispacked
#define ispacked( FIXES_ispacked(
#endif

/**
* <fixes>GetPlayerPoolSize</fixes>
*/
Expand Down