From: Brendan Hansen Date: Wed, 4 May 2022 16:36:13 +0000 (-0500) Subject: escaping doesn't work like I expected it to in multi-line strings X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=b0919f66d4651c1f8ee1b39e30d3acb0893961cb;p=onyx.git escaping doesn't work like I expected it to in multi-line strings --- diff --git a/modules/glfw3/build.onyx b/modules/glfw3/build.onyx index fd968af1..f202fdb8 100644 --- a/modules/glfw3/build.onyx +++ b/modules/glfw3/build.onyx @@ -35,7 +35,7 @@ main :: () { GLFWwindow *window = (GLFWwindow *) params->data[0].of.i64; \ char name[512]; \ strncpy(name, ONYX_PTR(params->data[1].of.i32), params->data[2].of.i32); \ - name[params->data[2].of.i32] = '\0'; \ + name[params->data[2].of.i32] = '\\0'; \ __glfw_callback_##callback_name = runtime->wasm_extern_as_func(runtime->wasm_extern_lookup_by_name(runtime->wasm_module, runtime->wasm_instance, name)); \ callback_name(window, __glfw_##callback_name); \ return NULL; \ diff --git a/modules/glfw3/onyx_glfw3.c b/modules/glfw3/onyx_glfw3.c index 21957b32..5b6669fc 100644 Binary files a/modules/glfw3/onyx_glfw3.c and b/modules/glfw3/onyx_glfw3.c differ