From 7d93de8e6d778c0f5e5aa9401f1acd5f7f092800 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 17 Aug 2024 19:14:24 +0100 Subject: add backslash escape sequences to string literals --- mem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mem.h') diff --git a/mem.h b/mem.h index 84fa4bb..87f817b 100644 --- a/mem.h +++ b/mem.h @@ -15,12 +15,12 @@ void *M(State *S, void *ptr, size_t old, size_t new); // needs len,cap,d fields #define ENSURE_CAP(S, darr, type, needed) \ - if (darr.cap < needed) { \ + do { if (darr.cap < needed) { \ size_t __newsz = next_pwrof2(needed); \ if (__newsz < 8) __newsz = 8; \ darr.d = RENEW_ARR(S, darr.d, type, darr.cap, __newsz); \ darr.cap = __newsz; \ - } + } } while (0) size_t next_pwrof2(size_t x); -- cgit v1.2.3