Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 428f4999 authored by Yi-Yo Chiang's avatar Yi-Yo Chiang
Browse files

Fix unwanted sign-extention when converting byte -> int

byte(255) converts to int(-1). This is not what we want, we want
int(255), in other words unsigned conversion.

This bug is causing premature EOF when read() is called, because when a
byte(255) is returned, it gets sign-extend to int(-1), causing the
caller to think EOF is reached.

Bug: 217427392
Test: Presubmit
Change-Id: I8ee864816c77cfe2900f5e300d7d4411cce6753a
parent 66660a1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment