Fix AdString::getSubstr bug.