forked from github/server
fix a bug in the lua binding for writing a single unit
This commit is contained in:
parent
6ff110ae36
commit
1594c7a71b
|
@ -62,12 +62,10 @@ static int tolua_storage_read_unit(lua_State * L)
|
|||
|
||||
static int tolua_storage_write_unit(lua_State * L)
|
||||
{
|
||||
gamedata *data = (gamedata *)tolua_tousertype(L, 1, 0);
|
||||
struct unit *u = (struct unit *)tolua_tousertype(L, 2, 0);
|
||||
if (global.data_version) {
|
||||
gamedata *data = (gamedata *)tolua_tousertype(L, 1, 0);
|
||||
struct unit *u = (struct unit *)tolua_tousertype(L, 2, 0);
|
||||
write_unit(data, u);
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tolua_storage_read_float(lua_State * L)
|
||||
|
|
Loading…
Reference in New Issue