This patch fixes what seems like a copy-paste error that was causing crashes when drawing a large number of images. The calculation of copySize in oc_gl_canvas_encode_path(), which is the third parameter passed to oc_gl_grow_input_buffer(), was using eltCount instead of the intended pathCount. I fixed this and also added some guards in both of the encode functions to ensure that a newly calculated buffer capacity is always greater than eltCount or pathCount.
This patch fixes what seems like a copy-paste error that was causing crashes when drawing a large number of images. The calculation of copySize in
oc_gl_canvas_encode_path()
, which is the third parameter passed tooc_gl_grow_input_buffer()
, was using eltCount instead of the intended pathCount. I fixed this and also added some guards in both of the encode functions to ensure that a newly calculated buffer capacity is always greater than eltCount or pathCount.