summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-04-03 15:49:54 +0200
committerAlexander Larsson <alexl@redhat.com>2013-04-03 15:58:41 +0200
commitc340dfeaf84685f655f6e5ea2ff02b9b48763c78 (patch)
treeb70af551a0863b08438dc6d199565935c926b18f /gdk
parentb7a1561fef74144162613eb36978e5b7cb67a545 (diff)
downloadgtk+-c340dfeaf84685f655f6e5ea2ff02b9b48763c78.tar.gz
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.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/broadway/gdkbroadway-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/broadway/gdkbroadway-server.c b/gdk/broadway/gdkbroadway-server.c
index cb9bdf4664..adc28a0b72 100644
--- a/gdk/broadway/gdkbroadway-server.c
+++ b/gdk/broadway/gdkbroadway-server.c
@@ -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 */