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) {
180180 if (maxStrLen < sizeof (sso.buff ) - 1 ) {
181181 if (isSSO () || !buffer ()) {
182182 // Already using SSO, nothing to do
183- uint16_t oldLen = len ();
183+ size_t oldLen = len ();
184184 setSSO (true );
185185 setLen (oldLen);
186186 } else { // if bufptr && !isSSO()
187187 // Using bufptr, need to shrink into sso.buff
188188 char temp[sizeof (sso.buff )];
189189 memcpy (temp, buffer (), maxStrLen);
190190 free (wbuffer ());
191- uint16_t oldLen = len ();
191+ size_t oldLen = len ();
192192 setSSO (true );
193193 memcpy (wbuffer (), temp, maxStrLen);
194194 setLen (oldLen);
@@ -201,7 +201,7 @@ bool String::changeBuffer(unsigned int maxStrLen) {
201201 if (newSize > CAPACITY_MAX) {
202202 return false ;
203203 }
204- uint16_t oldLen = len ();
204+ size_t oldLen = len ();
205205 char *newbuffer = (char *)realloc (isSSO () ? nullptr : wbuffer (), newSize);
206206 if (newbuffer) {
207207 size_t oldSize = capacity () + 1 ; // include NULL.
You can’t perform that action at this time.
0 commit comments