1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Index: nsVCardObj.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/addrbook/src/nsVCardObj.cpp,v
retrieving revision 1.2
retrieving revision 1.2.24.1
diff -u -r1.2 -r1.2.24.1
--- mailnews/addrbook/src/nsVCardObj.cpp 14 Sep 2003 21:45:58 -0000 1.2
+++ mailnews/addrbook/src/nsVCardObj.cpp 31 Aug 2004 07:44:25 -0000 1.2.24.1
@@ -1344,16 +1344,13 @@
static void writeGroup(OFile *fp, VObject *o)
{
- char buf1[256];
- char buf2[256];
- PL_strcpy(buf1,NAME_OF(o));
- while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
- PL_strcpy(buf2,STRINGZ_VALUE_OF(o));
- PL_strcat(buf2,".");
- PL_strcat(buf2,buf1);
- PL_strcpy(buf1,buf2);
+ nsCAutoString buf(NAME_OF(o));
+
+ while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
+ buf.Insert(NS_LITERAL_CSTRING("."), 0);
+ buf.Insert(STRINGZ_VALUE_OF(o), 0);
}
- appendsOFile(fp,buf1);
+ appendsOFile(fp, buf.get());
}
static int inList(const char **list, const char *s)
|