Skip to content

Commit cf210df

Browse files
committed
fix(#119): 修复匹配空字符串时处理逻辑,确保正确从 ASS 转回 XML
1 parent 647c7e6 commit cf210df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AssFile/AssStringProcessing.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ char *assEscape(char *dstStr, char *srcStr, int dstStrLen, int mode)
298298
originalTextPtr = assEscapeList[listCnt].assEscapedText;
299299
assEscapedTextPtr = assEscapeList[listCnt].originalText;
300300
}
301-
302-
if (originalTextPtr == NULL || assEscapedTextPtr == NULL)
301+
302+
if (originalTextPtr == NULL || assEscapedTextPtr == NULL || *originalTextPtr == '\0')
303303
{ /* 匹配全部失败,直接拷贝文本 */
304304
*dstPtr = *srcPtr;
305305
dstPtr++;

0 commit comments

Comments
 (0)