Changeset 102345 in vbox for trunk/src/libs/xpcom18a4/xpcom/string
- Timestamp:
- Nov 27, 2023 6:48:07 PM (17 months ago)
- svn:sync-xref-src-repo-rev:
- 160481
- Location:
- trunk/src/libs/xpcom18a4/xpcom/string/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/string/src/nsPrintfCString.cpp
r1 r102345 39 39 #include "nsPrintfCString.h" 40 40 #include <stdarg.h> 41 #include "prprf.h"42 41 42 #include <iprt/string.h> 43 43 44 44 // though these classes define a fixed buffer, they do not set the F_FIXED … … 58 58 59 59 va_start(ap, format); 60 mLength = PR_vsnprintf(mData, physical_capacity, format, ap); 60 ssize_t cch = RTStrPrintf2V(mData, physical_capacity, format, ap); 61 Assert(cch > 0); 62 mLength = (size_type)cch; 61 63 va_end(ap); 62 64 } … … 79 81 80 82 va_start(ap, format); 81 mLength = PR_vsnprintf(mData, physical_capacity, format, ap); 83 ssize_t cch = RTStrPrintf2V(mData, physical_capacity, format, ap); 84 Assert(cch > 0); 85 mLength = (size_type)cch; 82 86 va_end(ap); 83 87 } -
trunk/src/libs/xpcom18a4/xpcom/string/src/nsStringObsolete.cpp
r102006 r102345 51 51 #include "nsCRT.h" 52 52 #include "nsUTF8Utils.h" 53 #include "prprf.h"54 53 55 54 #include <iprt/assert.h> … … 1132 1131 fmt = "%x"; 1133 1132 } 1134 PR_snprintf(buf, sizeof(buf), fmt, aInteger);1133 RTStrPrintf2(buf, sizeof(buf), fmt, aInteger); 1135 1134 Append(buf); 1136 1135 } … … 1152 1151 fmt = "%x"; 1153 1152 } 1154 PR_snprintf(buf, sizeof(buf), fmt, aInteger);1153 RTStrPrintf2(buf, sizeof(buf), fmt, aInteger); 1155 1154 AppendASCIItoUTF16(buf, *this); 1156 1155 } … … 1172 1171 fmt = "%llx"; 1173 1172 } 1174 PR_snprintf(buf, sizeof(buf), fmt, aInteger);1173 RTStrPrintf2(buf, sizeof(buf), fmt, aInteger); 1175 1174 Append(buf); 1176 1175 } … … 1192 1191 fmt = "%llx"; 1193 1192 } 1194 PR_snprintf(buf, sizeof(buf), fmt, aInteger);1193 RTStrPrintf2(buf, sizeof(buf), fmt, aInteger); 1195 1194 AppendASCIItoUTF16(buf, *this); 1196 1195 }
Note:
See TracChangeset
for help on using the changeset viewer.