snprintf() - stuck

Ah!

Well, that's something I didn't get.

I thought strlen(message) got the length of the message.

But now you say sizeof(message) is what I need.

That'll help.

Just on a tangent:
To get around any problems with the extra stuff added to the "message" - like the dat[] stuff, could I just substitute a large enough number rather than the sizeof(message)?

So say it would be:

 snprintf(message, 20, ..........);