Browse Source

Fix the Data object variant of File:write.

Fixes #1962
Sasha Szpakowski 2 years ago
parent
commit
b0e3246ba8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/filesystem/wrap_File.cpp

+ 1 - 1
src/modules/filesystem/wrap_File.cpp

@@ -171,7 +171,7 @@ int w_File_write(lua_State *L)
 		try
 		try
 		{
 		{
 			love::Data *data = luax_totype<love::Data>(L, 2);
 			love::Data *data = luax_totype<love::Data>(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)
 		catch (love::Exception &e)
 		{
 		{