public static void checkbuffer(LexState LS, int len)
{
if (((len) + MAXNOCHECK) > LS.buff.Length)
{
if (len < 500)
Array.Resize(ref LS.buff, len + EXTRABUFF);
else
{
// added by LiXizhi 2007.6.20: in case the file contains super large string, such as a base64 encoded file of 2MB, we will double the size instead using a fixed length.
Array.Resize(ref LS.buff, len * 2);
}
}
}