summaryrefslogtreecommitdiff
path: root/tnslc
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-08-10 01:16:26 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-08-10 01:16:26 -0400
commit9ab49df341025eca8e641ee539355edb15e0fff2 (patch)
tree97cd97561797c219ef9d3993ada51e5ed08984a4 /tnslc
parent9dd5e57a4526702d64276c47451fa19c2032e990 (diff)
Fix allocation logic
Diffstat (limited to 'tnslc')
-rw-r--r--tnslc/compiler.tnsl8
1 files changed, 6 insertions, 2 deletions
diff --git a/tnslc/compiler.tnsl b/tnslc/compiler.tnsl
index e455bb1..eb77b22 100644
--- a/tnslc/compiler.tnsl
+++ b/tnslc/compiler.tnsl
@@ -108,13 +108,13 @@ struct Path {
/; if (i < self.path_count - 1)
- pth = _alloc(new_len + 2)
+ pth = _realloc(pth, new_len + 2)
pth{new_len} = '/'
pth{new_len + 1} = 0
old_len++
new_len++
;; else
- pth = _alloc(new_len + 1)
+ pth = _realloc(pth, new_len + 1)
pth{new_len} = 0
;/
@@ -149,6 +149,10 @@ struct Path {
;/
;/
+#
+#
+#
+
/; compile (Path in, out)
;/ \ No newline at end of file