Fix for the \0 termination to trim the original string to max 239 bytes instead of 240.