Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Apr 5, 2024
1 parent fd64bdb commit 58493d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion source/library_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ void AsyncCallback(const FileAsyncRequest_t &request, int nBytesRead, FSAsyncSta
{
async->finished = true;
async->nBytesRead = nBytesRead;
Msg("Read %i\n", 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
5 changes: 3 additions & 2 deletions source/lua_ILuaInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,9 @@ void RunHook(GarrysMod::Lua::ILuaInterface* LUA, const char* name, ILuaValue* ar
{
for(auto&[key, val] : args->tbl)
{
++pushed;
PushValue(LUA, val);
Msg("Type: %i", val->type);
//++pushed;
//PushValue(LUA, val);
}
} else {
++pushed;
Expand Down
1 change: 1 addition & 0 deletions source/lua_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ struct IAsyncFile
int nBytesRead;
int Status;
bool finished = false;
const char* content;
};

struct ILuaThread
Expand Down

0 comments on commit 58493d5

Please sign in to comment.