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.