sprintf() mystery....

Thank you both. Works like a charm!

I did not modify the %.2X because it was in an example code. So I thought that it would be ok. Funny thing is I this half a year ago at school. So that makes it extra awkward..