about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-14 19:22:09 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-14 19:22:09 +0200
commit5cca932e90387781cfa14ae77d587c25c2e0dcf4 (patch)
treec4254764f2def57b6e247b37a9f04c77aff718c5
parentcbd6af4665052e12f7f9804942df8f435fb0929c (diff)
downloadchawan-5cca932e90387781cfa14ae77d587c25c2e0dcf4.tar.gz
mediaquery: fix logic error
Not isAscii means we cannot convert to char. Oops.
-rw-r--r--src/css/mediaquery.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/css/mediaquery.nim b/src/css/mediaquery.nim
index ef8bc7b5..e59f1f80 100644
--- a/src/css/mediaquery.nim
+++ b/src/css/mediaquery.nim
@@ -189,7 +189,7 @@ template expect_bool(b: bool, sfalse: string, strue: string) =
 template expect_comparison(comparison: var MediaQueryComparison) =
   let tok = consume_token()
   if tok != CSS_DELIM_TOKEN: return nil
-  if tok.rvalue.isAscii(): return nil
+  if not tok.rvalue.isAscii(): return nil
   let c = char(tok.rvalue)
   if c notin {'=', '<', '>'}: return nil
   block parse: