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 */