From 9d16e442eda99ef8a181c0ee5aa7193ab63b66af Mon Sep 17 00:00:00 2001 From: jjhdmlz1 Date: Sat, 14 Jun 2025 16:04:06 +0800 Subject: [PATCH] Update EncodingType.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix issue 252 : byte 改为 int 类型。 修复 算数溢出导致 程序语言无法切换的bug --- ContextMenuManager/BluePointLilac.Methods/EncodingType.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ContextMenuManager/BluePointLilac.Methods/EncodingType.cs b/ContextMenuManager/BluePointLilac.Methods/EncodingType.cs index 52ed4c49..862c9e7d 100644 --- a/ContextMenuManager/BluePointLilac.Methods/EncodingType.cs +++ b/ContextMenuManager/BluePointLilac.Methods/EncodingType.cs @@ -44,7 +44,7 @@ private static bool IsUTF8Bytes(byte[] bytes) int count = 1; //计算当前正分析的字符应还有的字节数 for(int i = 0; i < bytes.Length; i++) { - byte curByte = bytes[i];//当前分析的字节. + int curByte = bytes[i];//当前分析的字节. if(count == 1) { if(curByte >= 0x80)