From 3124395cf86a04aa74a38bb35de848980c6ca2ef Mon Sep 17 00:00:00 2001 From: Struma Date: Mon, 20 Dec 2021 17:38:17 -0500 Subject: [PATCH] Give Graphics.screenshot the correct pointer (fixes #51) --- binding/graphics-binding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding/graphics-binding.cpp b/binding/graphics-binding.cpp index a519427b..6de6cb5c 100644 --- a/binding/graphics-binding.cpp +++ b/binding/graphics-binding.cpp @@ -289,7 +289,7 @@ RB_METHOD(graphicsScreenshot) rb_thread_call_without_gvl([](void* fn) -> void* { graphicsScreenshotInternal((const char*)fn); return 0; - }, (void*)filename, 0, 0); + }, (void*)RSTRING_PTR(filename), 0, 0); #else graphicsScreenshotInternal(RSTRING_PTR(filename)); #endif