* fontset.c (fontset_pattern_regexp): Allocate three more bytes to

regex for '^', '$', and '\0'.
This commit is contained in:
Andrew Choi 2001-01-28 15:41:57 +00:00
parent 8005142f86
commit 5604ec34e4
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2001-01-28 Andrew Choi <akochoi@i-cable.com>
* fontset.c (fontset_pattern_regexp): Allocate three more bytes to
regex for '^', '$', and '\0'.
* alloc.c (allocate_string) [macintosh]: Call check_string_bytes
only if current_sblock has been initialized.

View file

@ -719,7 +719,7 @@ fontset_pattern_regexp (pattern)
|| strcmp (XSTRING (pattern)->data, CACHED_FONTSET_NAME))
{
/* We must at first update the cached data. */
char *regex = (char *) alloca (XSTRING (pattern)->size * 2);
char *regex = (char *) alloca (XSTRING (pattern)->size * 2 + 3);
char *p0, *p1 = regex;
/* Convert "*" to ".*", "?" to ".". */