summaryrefslogtreecommitdiff
path: root/src/c/urweb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 823e8824..d42cfaa6 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -382,11 +382,9 @@ void uw_write_script(uw_context ctx, uw_Basis_string s) {
ctx->script_front += len;
}
-char *uw_Basis_get_script(uw_context ctx, uw_unit u) {
+const char *uw_Basis_get_script(uw_context ctx, uw_unit u) {
if (ctx->script_front == ctx->script) {
- char *r = uw_malloc(ctx, 1);
- r[0] = 0;
- return r;
+ return ctx->script_header;
} else {
char *r = uw_malloc(ctx, 41 + (ctx->script_front - ctx->script) + strlen(ctx->script_header));