diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-28 22:44:11 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-28 22:44:11 +0200 |
commit | 08111c71cd84430f941a3a59716811dcf9301778 (patch) | |
tree | aab4945325f6fc9555d25fef2e0baffcb8067309 /src | |
parent | 4f64400ec3f2928b72085750d07a5ac5b6acdb50 (diff) | |
download | chawan-08111c71cd84430f941a3a59716811dcf9301778.tar.gz |
mediaquery: fix some missing has checks in parser
Diffstat (limited to 'src')
-rw-r--r-- | src/css/mediaquery.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/css/mediaquery.nim b/src/css/mediaquery.nim index 5df629d3..ef8bc7b5 100644 --- a/src/css/mediaquery.nim +++ b/src/css/mediaquery.nim @@ -268,6 +268,7 @@ template expect_length_range(range: var Slice[CSSLength], lengthaeq, lengthbeq: expect_comparison(comparison) if not skip_has: return nil expect_length(range.a) + if not skip_has: return nil expect_length(range.b) case comparison of COMPARISON_EQ: @@ -302,6 +303,7 @@ proc parseFeature(parser: var MediaQueryParser, t: MediaFeatureType, parser.skipBlanks() if (ismin or ismax) and t notin RangeFeatures: return nil + if not parser.has(): return nil let feature = case t of FEATURE_GRID: var b: bool |