Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • theora theora
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • theoratheora
  • Issues
  • #1751

Closed
Open
Created Nov 07, 2010 by Nicolas Kaiser@nikai

decode.c: fix operator precedence

Hi there!

In lib/decode.c I noticed what looks like an operator precedence issue to me.

It looks obvious to me that the intention is to do the "&" before the comparison, but this requires parentheses.

Best regards,

Nicolas Kaiser


--- a/lib/decode.c	2010-11-06 18:50:10.744638665 +0100
+++ b/lib/decode.c	2010-11-11 12:10:53.986342617 +0100
@@ -2706,8 +2706,8 @@ int th_decode_ycbcr_out(th_dec_ctx *_dec
                 }break;
                 /*Plus:*/
                 case 1:{
-                  if(bi&2==0)yp-=2;
-                  if(bi&1==0)xp-=2;
+                  if((bi&2)==0)yp-=2;
+                  if((bi&1)==0)xp-=2;
                   cairo_move_to(c,xp+4.5,yp+2.5);
                   cairo_line_to(c,xp+4.5,yp+6.5);
                   cairo_move_to(c,xp+2.5,yp+4.5);
Assignee
Assign to
Time tracking