You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ghostinj-dll/source/dll.cpp
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,11 @@
3
3
#include<stdio.h>
4
4
#include<filesystem>
5
5
6
+
#include"lua.hpp"
7
+
#include"lj_obj.h"
8
+
#include"luajit_rolling.h"
9
+
#include"lauxlib.h"
10
+
6
11
#if SYSTEM_WINDOWS
7
12
#ifndef DLFCN_H
8
13
#defineDLFCN_H
@@ -60,6 +65,29 @@ void Load()
60
65
{
61
66
Msg( "--- Holylib-GhostInj Loading ---\n" );
62
67
68
+
lua_State* state = luaL_newstate();
69
+
luaL_openlibs(state);
70
+
//luaJIT_setmode(state, 0, 0);
71
+
72
+
std::string code = "jit.on() local num = 1.7976931348623e308 for i = 1, 9999 do if 1 / num > 0 then --[[print(true, 1 / num)]] else error(\"wtf\") end end error(\"worked\")";
73
+
74
+
printf("holylib: Loading jit thing\n");
75
+
if (luaL_loadbuffer(state, code.c_str(), code.length(), "Test") == 0)
0 commit comments