Skip to content

Commit

Permalink
Fixed file.AsyncRead hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Apr 5, 2024
1 parent 92ff3b9 commit 3ae04f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/library_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ void AsyncCallback(const FileAsyncRequest_t &request, int nBytesRead, FSAsyncSta
async->finished = true;
async->nBytesRead = nBytesRead;
async->content = static_cast<char*>(request.pData);
Msg("Read %i %s\n", nBytesRead, async->content);
} else {
Msg("[Luathreaded] file.AsyncRead Invalid request?\n");
}
Expand Down Expand Up @@ -56,7 +55,7 @@ void FileLibThink(ILuaThread* thread)
LUA->PushString(file->req->pszFilename);
LUA->PushString(file->req->pszPathID);
LUA->PushNumber(file->Status);
LUA->PushString(static_cast<char*>(file->req->pData));
LUA->PushString(file->content);
LUA->CallFunctionProtected(4, 0, true);
LUA->ReferenceFree(file->callback);
files.push_back(file);
Expand Down

0 comments on commit 3ae04f9

Please sign in to comment.