From cde7d73147a7eca584e8ab938b965e49bb2947df Mon Sep 17 00:00:00 2001 From: sje Date: Tue, 11 Sep 2007 03:38:37 +0000 Subject: make zap icon true-colour git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@334 4f64403b-2f21-0410-a795-97e2b3489a10 --- MySpace/formatting.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MySpace/formatting.cpp') diff --git a/MySpace/formatting.cpp b/MySpace/formatting.cpp index d6b4055..7bd8325 100644 --- a/MySpace/formatting.cpp +++ b/MySpace/formatting.cpp @@ -81,7 +81,7 @@ char *symbols[25] = {":D", ":E", "X(", ":O", ":p", "}:)", ":)", "X)", ":{", "B|" ":X", "Q)", ":B", ";-)", "B)", ":))", ":G", ":,", ":[", "%)", "-:", "P)", ":|", ":X"}; void encode_smileys(char *buff, int size) { - char *tmp = new char[size]; + char *tmp = new char[size + 1]; int in = 0, out = 0; char sb[128]; @@ -105,8 +105,8 @@ void encode_smileys(char *buff, int size) { } tmp[out] = 0; - strncpy(buff, tmp, size); - delete tmp; + strncpy(buff, tmp, out + 1); + delete[] tmp; buff[size - 1] = 0; } -- cgit v1.2.3