1
0
Fork 0
forked from External/ergo

fix truncation check

* The message target was not being counted :-(
* The additional character added to the target by STATUSMSG was not counted
This commit is contained in:
Shivaram Lingamneni 2024-06-10 23:20:22 -04:00
parent 2aec5e167c
commit 0b333c7e72
2 changed files with 6 additions and 5 deletions

View file

@ -2184,6 +2184,7 @@ func validateLineLen(msgType history.ItemType, source, target, payload string) (
default:
return true
}
limit -= len(target)
limit -= len(payload)
return limit >= 0
}