That string is 144 characters long. snprint always leaves room for a NULL character at the end, so if you pass in a 144 character array (n = 144), it ends up chopping off the final space character. The return value is then 143.
This leads to a corner case where drawread isn't able to write the full string into memory, but it also doesn't return an error.
Right now, in the drawread function, the Qctl case checks if the buffer is LESS than 144 characters:
But then it does this snprint:
That string is 144 characters long. snprint always leaves room for a NULL character at the end, so if you pass in a 144 character array (n = 144), it ends up chopping off the final space character. The return value is then 143.
This leads to a corner case where drawread isn't able to write the full string into memory, but it also doesn't return an error.