summaryrefslogtreecommitdiff
path: root/src/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/message.c b/src/message.c
index 8adc22411..012811f9c 100644
--- a/src/message.c
+++ b/src/message.c
@@ -248,6 +248,13 @@ trunc_string(
int i;
int n;
+ if (*s == NUL)
+ {
+ if (buflen > 0)
+ *buf = NUL;
+ return;
+ }
+
if (room_in < 3)
room = 0;
half = room / 2;