From ffa7a5de843fa4059023a3e1658c3221c101a3b4 Mon Sep 17 00:00:00 2001 From: ubkp <118854183+ubkp@users.noreply.github.com> Date: Sat, 19 Aug 2023 08:27:48 -0300 Subject: [PATCH] Adjust the text_unicode.c example crashing fix --- examples/text/text_unicode.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c index 41c19fb83..b25e3273b 100644 --- a/examples/text/text_unicode.c +++ b/examples/text/text_unicode.c @@ -187,19 +187,11 @@ int main(void) // Add a new set of emojis when SPACE is pressed if (IsKeyPressed(KEY_SPACE)) RandomizeEmoji(); - // Set the selected emoji and copy its text to clipboard + // Set the selected emoji if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && (hovered != -1) && (hovered != selected)) { selected = hovered; selectedPos = hoveredPos; - #if defined(PLATFORM_WEB) - // Line Feed (LF) (New Line) must be escaped for SetClipboardText() for web - char *escapedString = TextReplace(messages[emoji[selected].message].text, "\x0A", "\\n"); - SetClipboardText(escapedString); - MemFree(escapedString); - #else - SetClipboardText(messages[emoji[selected].message].text); - #endif } Vector2 mouse = GetMousePosition();