2009/7/2 Dag-Erling Smørgrav <d...@des.no>:
> Alexander Best <alexbes...@math.uni-muenster.de> writes:
>>     for (i=0; i < sizeof(hdr->nintendo_logo); i++)
>>         fprintf(stderr, "%x", hdr->nintendo_logo[i]);
>
> What will this print if nintendo_logo is { 0x01, 0x02, 0x03, 0x04 }?

Good catch. It will print "0x1234" but it should print "0x01020304".
My example has the same error. The conversion specification should be
"%02x", not just "%x".

-- 
My preferred quotation of Robert Louis Stevenson is "You cannot
make an omelette without breaking eggs". Not because I like the
omelettes, but because I like the sound of eggs being broken.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to