mirror of https://github.com/bjornbytes/lovr.git
Fix bug with permanent vectors;
This commit is contained in:
parent
f91eed3834
commit
b51dece762
|
@ -59,9 +59,10 @@ float* luax_tovector(lua_State* L, int index, VectorType* type) {
|
|||
return lovrPoolResolve(pool, v);
|
||||
}
|
||||
} else {
|
||||
*type = *(VectorType*) p;
|
||||
if (*type > V_NONE || *type < MAX_VECTOR_TYPES) {
|
||||
return (float*) (type + 1);
|
||||
VectorType* t = p;
|
||||
if (*t > V_NONE && *t < MAX_VECTOR_TYPES) {
|
||||
*type = *t;
|
||||
return (float*) (t + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue