using correct bit not just any overload setting

This commit is contained in:
Ralf Becker 2014-02-07 14:02:48 +00:00
parent b90d93ddbb
commit 899c04abb5

View File

@ -67,7 +67,7 @@ function cut_bytes(&$data,$offset,$len=null)
{ {
return $func_overload & 2 ? mb_substr($data,$offset,bytes($data),'ascii') : substr($data,$offset); return $func_overload & 2 ? mb_substr($data,$offset,bytes($data),'ascii') : substr($data,$offset);
} }
return $func_overload ? mb_substr($data,$offset,$len,'ascii') : substr($data,$offset,$len); return $func_overload & 2 ? mb_substr($data,$offset,$len,'ascii') : substr($data,$offset,$len);
} }
if (!function_exists('mb_strlen')) if (!function_exists('mb_strlen'))