aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominik Pötzschke <16013351+dpoetzschke@users.noreply.github.com>2024-10-31 16:18:12 +0100
committerDominik Pötzschke <16013351+dpoetzschke@users.noreply.github.com>2024-10-31 16:18:12 +0100
commitf1de4804a5d816d2a65f6e1d3d4faf7d3f340f64 (patch)
treeb3618aa584ddf9243eedabde2321efadef50752c /src
parentd74f2154900c5d0d1335294265c65e01e44ccf51 (diff)
added braces
Diffstat (limited to 'src')
-rw-r--r--src/string.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/string.cpp b/src/string.cpp
index ff20fb11c..c461602a7 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -415,9 +415,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;