msi: Fix some copy/paste bugs in the implementation of
ns03ja at brocku.ca
Mon Jun 5 17:36:53 CDT 2006
On Monday, June 05, 2006 12:58, EA Durbin wrote:
> Okay what am i misunderstanding?, explain it to me as its imperative I
> learn, and I'd love to learn.
> %u is an unsigned integer which is 0 to +32,767.
> %i is a signed integer 32,767 to +32,767.
> If the sequence number is always going to be a positive number why should
> we allot it the extra 32,767 value range?
neil at t40-n ~ $ cat >tmp.c <<EOF
uint16_t i = -1;
neil at t40-n ~ $ gcc tmp.c
neil at t40-n ~ $ ./a.out
neil at t40-n ~ $
if you inspect the memory that's at i, you'll find it's 0xffff. If you read it
as signed, you interpret it using two's complement, if you read it as
unsigned, you still use all the bits, but there's no sign bit*.
* Strictly speaking it's not a sign bit, but is frequently referred to as one
More information about the wine-devel