Fix lovr.data.newBlob(blob);

This commit is contained in:
bjorn 2020-01-13 19:36:12 -08:00
parent 5dd35edcb3
commit bb7bcb9b3d
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ static int l_lovrDataNewBlob(lua_State* L) {
size = blob->size;
data = malloc(size);
lovrAssert(data, "Out of memory");
memcpy(data, blob->data, size);
}
const char* name = luaL_optstring(L, 2, "");
Blob* blob = lovrBlobCreate(data, size, name);