From 3372ec87759b83e6cc8b73e37a298cb804cbba5a Mon Sep 17 00:00:00 2001 From: steven-na Date: Tue, 28 Jul 2026 02:54:05 -0700 Subject: String tests --- src/string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/string.h') diff --git a/src/string.h b/src/string.h index 1b5f136..b8554ff 100644 --- a/src/string.h +++ b/src/string.h @@ -3,7 +3,7 @@ #include "common.h" #include "smrt_arena.h" -#define STRNG_BASE_POS (sizeof(ez_arena_t)) +#define STRNG_BASE_POS (sizeof(strng_t)) typedef struct { u64 alloc_size; @@ -15,4 +15,4 @@ strng_t *strng_from(smrt_arena_t *arena, char *c); b32 strng_set(strng_t *string, char *c); void strng_clear(strng_t *string); -#define STRNG_FMT(s) (int)s->len, (s+STRNG_BASE_POS) +#define STRNG_FMT(s) (int)s->len, (char *)((u8*)s+STRNG_BASE_POS) -- cgit v1.2.3