File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,15 +180,15 @@ bool String::changeBuffer(unsigned int maxStrLen) {
180
180
if (maxStrLen < sizeof (sso.buff ) - 1 ) {
181
181
if (isSSO () || !buffer ()) {
182
182
// Already using SSO, nothing to do
183
- uint16_t oldLen = len ();
183
+ size_t oldLen = len ();
184
184
setSSO (true );
185
185
setLen (oldLen);
186
186
} else { // if bufptr && !isSSO()
187
187
// Using bufptr, need to shrink into sso.buff
188
188
char temp[sizeof (sso.buff )];
189
189
memcpy (temp, buffer (), maxStrLen);
190
190
free (wbuffer ());
191
- uint16_t oldLen = len ();
191
+ size_t oldLen = len ();
192
192
setSSO (true );
193
193
memcpy (wbuffer (), temp, maxStrLen);
194
194
setLen (oldLen);
@@ -201,7 +201,7 @@ bool String::changeBuffer(unsigned int maxStrLen) {
201
201
if (newSize > CAPACITY_MAX) {
202
202
return false ;
203
203
}
204
- uint16_t oldLen = len ();
204
+ size_t oldLen = len ();
205
205
char *newbuffer = (char *)realloc (isSSO () ? nullptr : wbuffer (), newSize);
206
206
if (newbuffer) {
207
207
size_t oldSize = capacity () + 1 ; // include NULL.
You can’t perform that action at this time.
0 commit comments