[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Send C_DEBUGGER_REPLY_GET_BYTES responses
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] Send C_DEBUGGER_REPLY_GET_BYTES responses as unsigned char values |
Date: |
Sun, 6 Mar 2016 22:53:57 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Mar 06, 2016 at 04:01:05PM +1300, Evan Hanson wrote:
> On 2016-03-05 14:16, Peter Bex wrote:
> > On Fri, Mar 04, 2016 at 02:03:14PM +1300, Evan Hanson wrote:
> > > - sprintf(rw_buffer, " %lu", (unsigned long)((char
> > > *)C_data_pointer(x))[ n ]);
> > > + sprintf(rw_buffer, " %u", ((unsigned char
> > > *)C_data_pointer(x))[ n ]);
> >
> > Shouldn't this be printed as a character?
> > + sprintf(rw_buffer, " %c", ((unsigned char *)C_data_pointer(x))[
> > n ]);
>
> The goal is to print it as an integer in [0, 255], so no, I don't think so.
Yeah, silly me, I just got into the wrong thinking mode due to the
confusion over whether it would be widened to an integer.
I think the patch is good, I'll apply it soon.
Cheers,
Peter
signature.asc
Description: Digital signature