fix critical bug of mym_regex.c, cause undefined behaviour