I agree with this for sure. I'm dealing with inherited code and pulling hair on 
several fronts.

Turns out += is flawed as well but not because the low byte was not zero. 
Casting as you suggest to (unsigned char) seems to take care of the promotion 
problem.

Thanks again everyone.
Bob.

On Feb 8, 2013, at 1:17 PM, Grant Edwards <grant.b.edwa...@gmail.com> wrote:

> If you're just shuffling 8-bit wide chunks of data around, always,
> always, always use unsigned char.  Or better yet, uint8_t.

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to