From 2d6171f3e573c06dc9eb1c8fc3ada720998b24fa Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sat, 17 Sep 2016 22:42:09 +0100 Subject: #import search rule: relative then core/ --- src/string.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/string.cpp') diff --git a/src/string.cpp b/src/string.cpp index 0e243f66e..496c81d26 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -13,8 +13,9 @@ typedef struct String { gb_inline String make_string(u8 *text, isize len) { String s; s.text = text; - if (len < 0) + if (len < 0) { len = gb_strlen(cast(char *)text); + } s.len = len; return s; } -- cgit v1.2.3