修复数字解析错误

This commit is contained in:
xuncha authored and xuncha committed 2026-02-05 18:33:29 +08:00
1 parent ff2f6799c8
commit d7419669d6
4 files changed
+11 -4

No files matched your search

+2 -1
View File
@@ -270,7 +270,8 @@ class ExportService {
if (/^[0-9]+$/.test(raw)) {
return raw
}
if (this.looksLikeHex(raw)) {
// 只有当字符串足够长(超过16字符)且看起来像 hex 时才尝试解码
if (raw.length > 16 && this.looksLikeHex(raw)) {
const bytes = Buffer.from(raw, 'hex')
if (bytes.length > 0) return this.decodeBinaryContent(bytes)
}