You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// SSO is handled by checking the last byte of sso_buff.
256
-
// When not in SSO mode, that byte is set to 0xff, while when in SSO mode it is always 0x00 (so it can serve as the string terminator as well as a flag)
257
-
// This allows strings up up to 12 (11 + \0 termination) without any extra space.
258
-
enum { SSOSIZE = sizeof(struct_ptr) + 4 }; // Characters to allocate space for SSO, must be 12 or more
259
-
enum { CAPACITY_MAX = 65535 }; // If size of capacity changed, be sure to update this enum
260
+
// This allows strings up up to 11 (10 + \0 termination) without any extra space.
261
+
enum { SSOSIZE = sizeof(struct_ptr) + 4 - 1 }; // Characters to allocate space for SSO, must be 12 or more
262
+
struct_sso {
263
+
char buff[SSOSIZE];
264
+
unsignedchar len : 7; // Ensure only one byte is allocated by GCC for the bitfields
265
+
unsignedchar isSSO : 1;
266
+
} __attribute__((packed)); // Ensure that GCC doesn't expand the flag byte to a 32-bit word for alignment issues
267
+
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
0 commit comments