File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -281,8 +281,8 @@ class String {
281
281
// Contains the string info when we're not in SSO mode
282
282
struct _ptr {
283
283
char * buff;
284
- uint16_t cap;
285
- uint16_t len;
284
+ uint32_t cap;
285
+ uint32_t len;
286
286
};
287
287
// This allows strings up up to 11 (10 + \0 termination) without any extra space.
288
288
enum { SSOSIZE = sizeof (struct _ptr ) + 4 - 1 }; // Characters to allocate space for SSO, must be 12 or more
@@ -291,7 +291,11 @@ class String {
291
291
unsigned char len : 7 ; // Ensure only one byte is allocated by GCC for the bitfields
292
292
unsigned char isSSO : 1 ;
293
293
} __attribute__((packed)); // Ensure that GCC doesn't expand the flag byte to a 32-bit word for alignment issues
294
- enum { CAPACITY_MAX = 65535 }; // If typeof(cap) changed from uint16_t, be sure to update this enum to the max value storable in the type
294
+ #ifdef BOARD_HAS_PSRAM
295
+ enum { CAPACITY_MAX = 3145728 };
296
+ #else
297
+ enum { CAPACITY_MAX = 65535 };
298
+ #endif
295
299
union {
296
300
struct _ptr ptr;
297
301
struct _sso sso;
You can’t perform that action at this time.
0 commit comments