Skip to content

Commit b534570

Browse files
committed
b can be null, do a proper check, this fixes #344
1 parent 402867f commit b534570

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

org/w3c/css/parser/analyzer/CssParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3740,7 +3740,7 @@ final public char unaryOperator() throws ParseException {
37403740
} else {
37413741
;
37423742
}
3743-
anpb.set(op, n.image, pb, b.image, "An+B", ac);
3743+
anpb.set(op, n.image, pb, ((b!=null) ? b.image : null), "An+B", ac);
37443744
{if ("" != null) return anpb;}
37453745
} else {
37463746
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {

org/w3c/css/parser/analyzer/CssParser.jj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,7 @@ CssANPlusB anplusb() :
19621962
}
19631963
// generic aN+b including aN and N+b where N is mandatory
19641964
| LOOKAHEAD(2) ( ( op=unaryOperator() )? n=<AN> ( LOOKAHEAD(2) ( <S> )* ( pb=unaryOperator() ( <S> )* )? ( b=<NUMBER> ) )? ) {
1965-
anpb.set(op, n.image, pb, b.image, "An+B", ac);
1965+
anpb.set(op, n.image, pb, ((b!=null) ? b.image : null), "An+B", ac);
19661966
return anpb;
19671967
}
19681968
// DIMEN may match 2n- and possibly another number after

0 commit comments

Comments
 (0)