We now support MIME strings of maximal length B_MIME_TYPE_LENGTH including the null only. Adjusted the tests accordingly.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1132 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-09-23 21:08:51 +00:00
parent 9a17c3cfac
commit ce61895f3e

View File

@ -2746,7 +2746,13 @@ static
void
init_long_types(char *notTooLongType, char *tooLongType)
{
// R5: Allows buffer sizes up to `B_MIME_TYPE_LENGTH + 1'
// OBOS: We stay consistent: `*_LENGTH' defines the buffer size.
#ifdef TEST_R5
const int notTooLongLength = B_MIME_TYPE_LENGTH;
#else
const int notTooLongLength = B_MIME_TYPE_LENGTH - 1;
#endif
const int tooLongLength = notTooLongLength + 1;
strcpy(notTooLongType, "image/");
memset(notTooLongType + strlen(notTooLongType), 'a',