diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-09-11 03:38:37 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-09-11 03:38:37 +0000 |
commit | cde7d73147a7eca584e8ab938b965e49bb2947df (patch) | |
tree | 84d474271abb88eee404b8dc66c4585e135a9b1d /MySpace/formatting.cpp | |
parent | 360850ab80b359ac758abf14ad65a1d4c7cec218 (diff) |
make zap icon true-colour
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@334 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/formatting.cpp')
-rw-r--r-- | MySpace/formatting.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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;
}
|