summaryrefslogtreecommitdiff
path: root/MySpace/formatting.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-07-01 16:50:43 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-07-01 16:50:43 +0000
commit7d2d0d17e720b43162433410b88ff1de7f019f38 (patch)
treed9693399fbf3ab569941b5ac1da14f70013c2f30 /MySpace/formatting.cpp
parentf98ef8ff5f7c6d2485d9e627a9af67d67e846d72 (diff)
fix 'unentitizing' formatting
unentitize nicks try to fix missed packets again (not fixed yet) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@235 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/formatting.cpp')
-rw-r--r--MySpace/formatting.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/MySpace/formatting.cpp b/MySpace/formatting.cpp
index d2604fe..4b8669a 100644
--- a/MySpace/formatting.cpp
+++ b/MySpace/formatting.cpp
@@ -27,15 +27,15 @@ void unentitize(char *buff) {
int in = 0, out = 0;
while(buff[in]) {
if(buff[in] == '&') {
- if(strcmp(buff + in, "&quot;") == 0) {
+ if(strncmp(buff + in, "&quot;", 6) == 0) {
buff[out++] = '\"'; in += 6;
- } else if(strcmp(buff + in, "&amp;") == 0) {
+ } else if(strncmp(buff + in, "&amp;", 5) == 0) {
buff[out++] = '&'; in += 5;
- } else if(strcmp(buff + in, "&apos;") == 0) {
+ } else if(strncmp(buff + in, "&apos;", 6) == 0) {
buff[out++] = '\''; in += 6;
- } else if(strcmp(buff + in, "&lt;") == 0) {
+ } else if(strncmp(buff + in, "&lt;", 4) == 0) {
buff[out++] = '<'; in += 4;
- } else if(strcmp(buff + in, "&gt;") == 0) {
+ } else if(strncmp(buff + in, "&gt;", 4) == 0) {
buff[out++] = '>'; in += 4;
} else
buff[out++] = buff[in++];