diff --git a/src/modules/filesystem/wrap_File.cpp b/src/modules/filesystem/wrap_File.cpp index 21692c597..998133047 100644 --- a/src/modules/filesystem/wrap_File.cpp +++ b/src/modules/filesystem/wrap_File.cpp @@ -171,7 +171,7 @@ int w_File_write(lua_State *L) try { love::Data *data = luax_totype(L, 2); - result = file->write(data, luaL_optinteger(L, 3, data->getSize())); + result = file->write(data->getData(), luaL_optinteger(L, 3, data->getSize())); } catch (love::Exception &e) {