What does

while (c != sk.sz)
{
	newbuff[c] = strtol(&buff[c], NULL, 16);
	printf("%lx\n", newbuff[c]);
	c=c+3;
}

display?

Until you fix your read process into something like this instead of that convoluted mess, I'm done, too. Unless you can give me a good reason for code like that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.