IT: the max. 8000 bytes msg. length have to include the NUL

This commit is contained in:
Mathias Panzenböck 2011-06-24 01:53:20 +02:00
parent 57526c6c37
commit c7fd4cd2fc

View File

@ -134,9 +134,9 @@ bool IT::File::save()
// it's actually not really stated if the message needs a
// terminating NUL but it does not hurt to add one:
if(message.size() > 7999)
message.resize(7999);
message.append((char)0);
if(message.size() > 8000)
message.resize(8000);
ushort special = 0;
ushort messageLength = 0;