From a71832570cbb486c0656db89936f237f945396d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20P=C3=B6tzschke?= <16013351+dpoetzschke@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:18:12 +0100 Subject: [PATCH] added braces --- src/string.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/string.cpp b/src/string.cpp index 412889e0f..f8ee6c53e 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -416,9 +416,11 @@ gb_internal String concatenate4_strings(gbAllocator a, String const &x, String c gb_internal String escape_char(gbAllocator a, String s, char cte) { isize buf_len = s.len; isize cte_count = 0; - for (isize j = 0; j < s.len; j++) - if (s.text[j] == cte) + for (isize j = 0; j < s.len; j++) { + if (s.text[j] == cte) { cte_count++; + } + } u8 *buf = gb_alloc_array(a, u8, buf_len+cte_count); isize i = 0;