[haiku-commits] Re: r37586 - in haiku/trunk/src: kits/locale tools/locale

  • From: Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 19 Jul 2010 17:01:20 +0200

2010/7/19 Adrien Destugues <pulkomandy@xxxxxxxxxxxxxxxxx>:
>> > +                               char tmp[3];
>> > +                               tmp[0] = *(in+1);
>> > +                               tmp[1] = *(in+2);
>> > +                               tmp[3] = '\0';
>> > +                               unsigned int hexchar = strtoul(tmp,
>> > NULL, 16);
>>
>> Shouldn't is be char tmp[4]?
>
> No, but the \0 should be put in tmp[2].
> Fixing in a few moments...
>

Manual string handling is pretty bad, though.
But not having read the previous commit, please take this without
offence or whatever.

Other related posts: