summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c')
-rw-r--r--src/c/lacweb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/c/lacweb.c b/src/c/lacweb.c
index 7ee6daef..50f11ef1 100644
--- a/src/c/lacweb.c
+++ b/src/c/lacweb.c
@@ -192,8 +192,9 @@ static void lw_write_unsafe(lw_context ctx, const char* s) {
}
void lw_write(lw_context ctx, const char* s) {
- lw_check(ctx, strlen(s));
+ lw_check(ctx, strlen(s) + 1);
lw_write_unsafe(ctx, s);
+ *ctx->page_front = 0;
}
@@ -510,7 +511,9 @@ lw_Basis_string lw_Basis_strcat(lw_context ctx, lw_Basis_string s1, lw_Basis_str
int len = strlen(s1) + strlen(s2) + 1;
char *s;
- lw_check(ctx, len);
+ printf("s1 = %s\ns2 = %s\n", s1, s2);
+
+ lw_check_heap(ctx, len);
s = ctx->heap_front;
@@ -518,5 +521,7 @@ lw_Basis_string lw_Basis_strcat(lw_context ctx, lw_Basis_string s1, lw_Basis_str
strcat(s, s2);
ctx->heap_front += len;
+ printf("s = %s\n", s);
+
return s;
}