From 9ae10ce69b10a8bddb484fed8b7458859a5b31a3 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Thu, 4 Oct 2018 21:45:30 +0700 Subject: [PATCH] ispacked fix --- fixes.inc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/fixes.inc b/fixes.inc index 714f91e..0970c64 100644 --- a/fixes.inc +++ b/fixes.inc @@ -1345,6 +1345,18 @@ in the output code. * * * + * + * + * Returns false when the string is packed and starts with a symbol with code 128 and above. + * + * + * Check the string manually. + * + * FIXES_ispacked + * Daniel_Cortez + * VVWVV + * + * * * * Teleporting player to passenger seat after delay. @@ -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) @@ -11537,6 +11556,29 @@ native BAD_tolower(c) = tolower; #define tolower( FIXES_tolower( #endif +/** + * ispacked + */ + +#if defined _ALS_ispacked + #error _ALS_ispacked defined +#endif +native bool:BAD_ispacked(const string[]) = ispacked; + +/** + * ispacked + */ + +#if FIX_ispacked + stock bool:FIXES_ispacked(const string[]) + { + return (string[0] & ~0xFF) != 0; + } + + #define _ALS_ispacked + #define ispacked( FIXES_ispacked( +#endif + /** * GetPlayerPoolSize */