Skip to content

Commit

Permalink
Fixed it?
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Nov 27, 2023
1 parent f885edc commit 496c848
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/class_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void Push_Vector(ILuaBase* LUA, const Vector* vec)

LUA->Pop(1);

Vector *vec = LUA->NewUserType<Vector>(metatype);
Vector* uvec = LUA->NewUserType<Vector>(metatype);

LUA->PushMetaTable(metatype);
LUA->SetMetaTable(-2);
Expand Down Expand Up @@ -129,7 +129,8 @@ LUA_FUNCTION(_Vector)
int y = LUA->CheckNumber(2);
int z = LUA->CheckNumber(3);

LUA->PushVector(Vector(x, y, z));
Vector vec = Vector(x, y, z);
LUA->PushVector(vec);

return 1;
}
Expand Down

0 comments on commit 496c848

Please sign in to comment.