From 148c8469b7ec8fd68ff76f10a167f4edd0193a09 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Tue, 10 Sep 2019 16:12:45 -0700 Subject: [PATCH] Fix CURL WRITEFUNCTION callback on HL --- project/src/net/curl/CURLBindings.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/src/net/curl/CURLBindings.cpp b/project/src/net/curl/CURLBindings.cpp index 5b6b7d394..f6bf7e3ee 100644 --- a/project/src/net/curl/CURLBindings.cpp +++ b/project/src/net/curl/CURLBindings.cpp @@ -714,8 +714,11 @@ namespace lime { // writeBufferSize[easy_handle] = 0; writeBufferPosition[easy_handle] = 0; + vdynamic* pos = hl_alloc_dynamic (&hlt_i32); + pos->v.i = position; + curl_gc_mutex.Unlock (); - length = *((int*)writeCallback->Call (bytes, &position)); + length = *((int*)writeCallback->Call (bytes, pos)); curl_gc_mutex.Lock (); if (length == CURL_WRITEFUNC_PAUSE) {