diff --git a/src/Window.c b/src/Window.c index 9315a5964..512702015 100644 --- a/src/Window.c +++ b/src/Window.c @@ -2736,9 +2736,12 @@ static RequestClipboardCallback clipboard_func; static void* clipboard_obj; EMSCRIPTEN_KEEPALIVE void Window_GotClipboardText(char* src) { - String str = String_FromReadonly(src); + String str; char strBuffer[512]; if (!clipboard_func) return; + String_InitArray(str, strBuffer); + String_AppendUtf8(&str, src, String_CalcLen(src, 2048)); + clipboard_func(&str, clipboard_obj); clipboard_func = NULL; }