From 8bf9f4831015bed7d828280d911fb52f8a20ee9f Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 13 Jun 2007 08:06:55 +0000 Subject: [PATCH] (load_command): Prepend "^" in the regular expression. --- src/font-flt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/font-flt.c b/src/font-flt.c index 9f7b723..4a11c0b 100644 --- a/src/font-flt.c +++ b/src/font-flt.c @@ -633,8 +633,14 @@ load_command (FontLayoutStage *stage, MPlist *plist, cmd->type = FontLayoutCmdTypeRule; if (MPLIST_MTEXT_P (elt)) { - char *str = (char *) MTEXT_DATA (MPLIST_MTEXT (elt)); + MText *mt = MPLIST_MTEXT (elt); + char *str = (char *) MTEXT_DATA (mt); + if (str[0] != '^') + { + mtext_ins_char (mt, 0, '^', 1); + str = (char *) MTEXT_DATA (mt); + } if (regcomp (&cmd->body.rule.src.re.preg, str, REG_EXTENDED)) MERROR (MERROR_FONT, INVALID_CMD_ID); cmd->body.rule.src_type = SRC_REGEX; -- 1.7.10.4