diff --git a/aegisub/src/auto4_lua.cpp b/aegisub/src/auto4_lua.cpp index 2d689e241..bb97e10ec 100644 --- a/aegisub/src/auto4_lua.cpp +++ b/aegisub/src/auto4_lua.cpp @@ -42,6 +42,7 @@ #ifndef AGI_PRE #include +#include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include #endif @@ -223,7 +225,7 @@ namespace { lua_pushstring(L, "Flags must follow all non-flag arguments"); return 1; } - ret |= (int)lua_touserdata(L, i); + ret |= (int)(intptr_t)lua_touserdata(L, i); } lua_pushinteger(L, ret);