Fix PhanPluginDuplicateExpressionBinaryOp in DjVuImage (#9)
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 6 Apr 2019 06:40:01 +0000 (23:40 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 6 Apr 2019 06:40:11 +0000 (23:40 -0700)
commite77937bbac44cf179800d4e6abc5fc391b1a9735
tree7458e52b0c49c6c9303d9e6ce75ec2c63af04d3d
parent5f8d76336dba61aa6ce495a92e30367368aaa651
Fix PhanPluginDuplicateExpressionBinaryOp in DjVuImage (#9)

== has a higher precedence operator than &.

So the line `$chunkLength & 1 == 1` is interepreted as:
`$chunkLength & true`. Probably not what was intended, but it actually
works out because true is cast to 1, and the expression will either
result with 0 (falsey) or 1 (truthy), and we were looking for it to
equal 1 anyways. Incredible.

I assume that it was supposed to be `( $chunkLength & 1 ) == 1`, so I've
modified it to use that.

Change-Id: If03823b9286e0d8282519949bf46e2ba4cca0843
.phan/config.php
includes/media/DjVuImage.php