aboutsummaryrefslogtreecommitdiff
path: root/brailleboi.c
diff options
context:
space:
mode:
Diffstat (limited to 'brailleboi.c')
-rw-r--r--brailleboi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/brailleboi.c b/brailleboi.c
index 7957d8b..82fbeeb 100644
--- a/brailleboi.c
+++ b/brailleboi.c
@@ -39,9 +39,9 @@ void braillePrint(int data)
int braillePlot(int x, int y, image_buffer* buf)
{
//Check if plot is within bounds
- if (x>buf->width | y>buf->height)
+ if ((x>buf->width) | (y>buf->height))
return 1;
- buf->contents[(y-1)/4 * buf->char_width + (x-1)/2] |= 1<<(y-1)%4+(1-x%2)*4;
+ buf->contents[(y-1)/4 * buf->char_width + (x-1)/2] |= 1<<((y-1)%4+(1-x%2)*4);
return 0;
}