fix DrawableText crash (#574)

This commit is contained in:
Carter Anderson 2020-09-25 17:57:23 -07:00 committed by GitHub
parent a3012d94bb
commit 05db806e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ impl<'a> Drawable for DrawableText<'a> {
{
draw.set_index_buffer(quad_index_buffer, 0);
if let Some(buffer_info) = render_resource_context.get_buffer_info(quad_index_buffer) {
indices = 0..(buffer_info.size / 2) as u32;
indices = 0..(buffer_info.size / 4) as u32;
} else {
panic!("expected buffer type");
}