From cd1c24567061ad01d1b99088c96a69564b6efa06 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 23 Sep 2011 01:07:18 +0000 Subject: [PATCH] fixed a bug of eating up one more character when handling an \X escape sequuence --- qse/lib/sed/sed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qse/lib/sed/sed.c b/qse/lib/sed/sed.c index 1e40cb14..78b82acb 100644 --- a/qse/lib/sed/sed.c +++ b/qse/lib/sed/sed.c @@ -1,5 +1,5 @@ /* - * $Id: sed.c 572 2011-09-21 05:10:09Z hyunghwan.chung $ + * $Id: sed.c 575 2011-09-22 07:07:18Z hyunghwan.chung $ * Copyright 2006-2011 Chung, Hyung-Hwan. This file is part of QSE. @@ -535,7 +535,7 @@ Omitted for clash with regular expression \b. #ifdef QSE_CHAR_IS_WCHAR case QSE_T('X'): { - /* \Xnnnnnnnn for wchar_t */ + /* \Xnnnn or \Xnnnnnnnn for wchar_t */ int cc, i; cc = xdigit_to_num(PEEPNXTSC(sed)); @@ -543,7 +543,7 @@ Omitted for clash with regular expression \b. NXTSC(sed); c = cc; - for (i = 0; i < QSE_SIZEOF(qse_char_t) * 2; i++) + for (i = 1; i < QSE_SIZEOF(qse_char_t) * 2; i++) { cc = xdigit_to_num(PEEPNXTSC(sed)); if (cc <= -1) break;