Skip to content

特殊场景会抛异常 #1

Description

@zhangchievil

TemplateAnalyseUtils类。第43行。
tpl如下
$Func{intRand()}|$Var{tmp}=$Func{doubleRand(0,10,2)}|"$Dic{ot}"|"$Var{tmp}"|"$Dic{b}"
此处判断hasfun是true,hasvar是true,但其实hasvar是后面的。此时funcIndex值是0,执行到这一行的时候数组越界。
template.charAt(funcIndex-1) == eq && template.charAt(funcIndex-2) == closeBrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions