From 7d2d0d17e720b43162433410b88ff1de7f019f38 Mon Sep 17 00:00:00 2001 From: sje Date: Sun, 1 Jul 2007 16:50:43 +0000 Subject: 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 --- MySpace/formatting.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'MySpace/formatting.cpp') 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, """) == 0) { + if(strncmp(buff + in, """, 6) == 0) { buff[out++] = '\"'; in += 6; - } else if(strcmp(buff + in, "&") == 0) { + } else if(strncmp(buff + in, "&", 5) == 0) { buff[out++] = '&'; in += 5; - } else if(strcmp(buff + in, "'") == 0) { + } else if(strncmp(buff + in, "'", 6) == 0) { buff[out++] = '\''; in += 6; - } else if(strcmp(buff + in, "<") == 0) { + } else if(strncmp(buff + in, "<", 4) == 0) { buff[out++] = '<'; in += 4; - } else if(strcmp(buff + in, ">") == 0) { + } else if(strncmp(buff + in, ">", 4) == 0) { buff[out++] = '>'; in += 4; } else buff[out++] = buff[in++]; -- cgit v1.2.3