From 3c35f7537d193f34295618f918ba09c8bcb37078 Mon Sep 17 00:00:00 2001 From: Ulya Fokanova Date: Tue, 25 Feb 2014 13:51:22 +0300 Subject: [PATCH] UTF-16: Fixed handling of single 2-word code point. --- re2c/utf16_regexp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2c/utf16_regexp.cc b/re2c/utf16_regexp.cc index 3e882cf8..a19ea95c 100644 --- a/re2c/utf16_regexp.cc +++ b/re2c/utf16_regexp.cc @@ -12,7 +12,7 @@ RegExp * UTF16Symbol(utf16::rune r) { const ushort ld = utf16::lead_surr(r); const ushort tr = utf16::trail_surr(r); - return new CatOp(new MatchOp(new Range(ld, ld)), new MatchOp(new Range(tr, tr))); + return new CatOp(new MatchOp(new Range(ld, ld + 1)), new MatchOp(new Range(tr, tr + 1))); } } -- 2.40.0