[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src smileys.c,1.20,1.21
From: |
Edward L. Haletky <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src smileys.c,1.20,1.21 |
Date: |
Thu, 27 Mar 2003 16:36:29 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv18771/src
Modified Files:
smileys.c
Log Message:
eb_smilify added a character when ipos was out of scope.
Index: smileys.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/smileys.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- smileys.c 26 Mar 2003 21:39:57 -0000 1.20
+++ smileys.c 27 Mar 2003 21:36:27 -0000 1.21
@@ -209,7 +209,7 @@
return g_strdup(text);
}
- newstr=g_string_sized_new(2048);
+ newstr=g_string_sized_new(4096);
if (!text) return g_strdup("");
@@ -218,10 +218,12 @@
/* ignore anything in < > */
while(text[ipos] == '<') {
while(text[ipos] && text[ipos] != '>') {
- g_string_append_c(newstr, text[ipos++]);
+ if (ipos < strlen(text))
+ g_string_append_c(newstr, text[ipos++]);
}
if(text[ipos] == '>')
- g_string_append_c(newstr, text[ipos++]);
+ if (ipos < strlen(text))
+ g_string_append_c(newstr, text[ipos++]);
else /* text[ipos] is null */
break;
}
@@ -274,7 +276,10 @@
}
l=l->next;
}
- if(!found) { g_string_append_c(newstr, text[ipos++]); }
+ if(!found) {
+ if (ipos < strlen(text))
+ g_string_append_c(newstr, text[ipos++]);
+ }
}
result = newstr->str;
- [Ayttm-commits] CVS: ayttm/src smileys.c,1.20,1.21,
Edward L. Haletky <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.459,1.460 configure.in,1.456,1.457
- Next by Date:
Re: [Ayttm-commits] CVS: ayttm/src smileys.c,1.20,1.21
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.459,1.460 configure.in,1.456,1.457
- Next by thread:
Re: [Ayttm-commits] CVS: ayttm/src smileys.c,1.20,1.21
- Index(es):