aboutsummaryrefslogtreecommitdiff
path: root/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'string.h')
-rw-r--r--string.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/string.h b/string.h
index 2420f91..a984929 100644
--- a/string.h
+++ b/string.h
@@ -6,7 +6,8 @@
#ifndef STRING_H
#define STRING_H
-#define S(s) (Str){s, sizeof(s) - 1}
+#define S(s) \
+ (Str) { s, lengthof(s) }
typedef struct {
byte *data;
size len;