mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-14 21:23:47 +08:00
修复文本文档以'~'结尾报错
This commit is contained in:
@@ -402,7 +402,7 @@ class BytesEncodingDetect extends Encoding {
|
||||
int row, column;
|
||||
rawtextlen = rawtext.length;
|
||||
for (i = 0; i < rawtextlen; i++) {
|
||||
if (rawtext[i] == '~') {
|
||||
if (rawtext[i] == '~' && i < rawtextlen - 1) {
|
||||
if (rawtext[i + 1] == '{') {
|
||||
hzstart++;
|
||||
i += 2;
|
||||
@@ -4641,4 +4641,4 @@ class Encoding {
|
||||
nicename[OTHER] = "OTHER";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user