From 7719e28c7e9bc598a4299cd7a38e75641ab21041 Mon Sep 17 00:00:00 2001 From: Haozhun Jin Date: Wed, 25 Mar 2015 17:45:49 -0700 Subject: [PATCH] Check the validity of all mbc created --- src/org/joni/OptMapInfo.java | 7 ++++++- src/org/joni/Parser.java | 3 +++ src/org/joni/ast/StringNode.java | 6 ++++++ src/org/joni/exception/ErrorMessages.java | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/org/joni/OptMapInfo.java b/src/org/joni/OptMapInfo.java index 9d3574b7..02329b2b 100644 --- a/src/org/joni/OptMapInfo.java +++ b/src/org/joni/OptMapInfo.java @@ -21,6 +21,8 @@ import org.jcodings.CaseFoldCodeItem; import org.jcodings.Encoding; +import org.joni.exception.ErrorMessages; +import org.joni.exception.ValueException; final class OptMapInfo { @@ -61,7 +63,10 @@ void addCharAmb(byte[]bytes, int p, int end, Encoding enc, int caseFoldFlag) { byte[] buf = new byte[Config.ENC_CODE_TO_MBC_MAXLEN]; for (int i=0; i