You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On line 97 in the code the "dtype" variable is used, which is always undefined on that else branch, as it was declared on line 79 and never initialized. I would guess maybe it was meant to be "type" function argument instead.
This breaks the code if you init elements buffer with no data and the buffer type is uint16 or uint32. Because later subdata calls might allocate a wrong typed buffer from the pool and such.
P.S. TypeScript is the way to catch bugs like these, but I guess it's too late for regl. 😞
The text was updated successfully, but these errors were encountered:
On line 97 in the code the "dtype" variable is used, which is always undefined on that else branch, as it was declared on line 79 and never initialized. I would guess maybe it was meant to be "type" function argument instead.
regl/lib/elements.js
Lines 79 to 97 in 63cd83c
In other words the fix would be to do:
on line 97, but I'm not sure.
This breaks the code if you init elements buffer with no data and the buffer type is uint16 or uint32. Because later subdata calls might allocate a wrong typed buffer from the pool and such.
P.S. TypeScript is the way to catch bugs like these, but I guess it's too late for regl. 😞
The text was updated successfully, but these errors were encountered: