summaryrefslogtreecommitdiff
path: root/ratatox.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-15 15:21:02 +0100
committersin <sin@2f30.org>2014-09-15 15:21:02 +0100
commit34171f70ed59100b5371ba81341da66dc186782b (patch)
treee0f70622a66d7706cb5c8461a4c9cc212a32bce0 /ratatox.c
parent27f88d44c47bd0fc2c6aa07e8c9825f6013495d6 (diff)
Fix off-by-one
Diffstat (limited to 'ratatox.c')
-rw-r--r--ratatox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratatox.c b/ratatox.c
index d988d85..6992656 100644
--- a/ratatox.c
+++ b/ratatox.c
@@ -518,7 +518,7 @@ friendcreate(int32_t fid)
blabla(f, "online", "w",
tox_get_friend_connection_status(tox, fid) == 0 ? "0\n" : "1\n");
r = tox_get_status_message_size(tox, fid);
- if (r > TOX_MAX_STATUSMESSAGE_LENGTH + 1)
+ if (r > TOX_MAX_STATUSMESSAGE_LENGTH)
r = TOX_MAX_STATUSMESSAGE_LENGTH;
statusmsg[r] = '\0';
blabla(f, "statusmsg", "w", "%s\n", statusmsg);