Broadway: Fix shm names

We were sometimes getting zero chars in the name, making them
shorter, due to an off-by-zero in the size.
This commit is contained in:
Alexander Larsson 2013-04-03 15:49:54 +02:00
parent b7a1561fef
commit c340dfeaf8

View File

@ -506,7 +506,7 @@ make_valid_fs_char (char c)
{
char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
return chars[c % sizeof (chars)];
return chars[c % (sizeof (chars) - 1)];
}
/* name must have at least space for 34 bytes */