mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
stbi: fix loading image from memory (#15981)
This commit is contained in:
parent
03f82d5f68
commit
07d5612347
2 changed files with 12 additions and 3 deletions
|
@ -227,8 +227,9 @@ pub fn (mut ctx Context) create_image_from_memory(buf &u8, bufsize int) Image {
|
|||
ok: stb_img.ok
|
||||
data: stb_img.data
|
||||
ext: stb_img.ext
|
||||
id: ctx.image_cache.len
|
||||
}
|
||||
img.init_sokol_image()
|
||||
img.id = ctx.image_cache.len
|
||||
ctx.image_cache << img
|
||||
return img
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue