I think I did an Optiboot loader which does not suffer from the 0xFF issue. I can't recall if that is the one that this sketch uploads or not, but that would explain why I didn't have the issue with the 0xFFs at the end, and you did. Of course in this case you need to upgrade the board which uploads the sketches, rather than the Mega2560 board.
Thanks for your answer, nick.I think, the problem is now resolved.Many, many thanks for your great work!Please update the sketch on your great website also, because i use this place normally.paulinchen
But i use only MEGA2560 boards, so i must use as programmer-board also a MEGA2560. You mean, than i use a UNO-board, the problem with the 0xff issue are not present?
int foo = -1; // this is 0xFFFF
I updated my website.