The -1 is to take into account the leading '\0' character. Is it ok?