mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08:00
stb_image.h (stbi__start_mem): initialize io.skip and io.eof to NULL
Patch authored by @NBickford-NV: https://github.com/miniupnp/stb/pull/1
c.f.: https://github.com/nothings/stb/pull/1751
(cherry picked from commit ab900a389f)
This commit is contained in:
@@ -895,6 +895,8 @@ static void stbi__refill_buffer(stbi__context *s);
|
|||||||
static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
|
static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
|
||||||
{
|
{
|
||||||
s->io.read = NULL;
|
s->io.read = NULL;
|
||||||
|
s->io.skip = NULL;
|
||||||
|
s->io.eof = NULL;
|
||||||
s->read_from_callbacks = 0;
|
s->read_from_callbacks = 0;
|
||||||
s->callback_already_read = 0;
|
s->callback_already_read = 0;
|
||||||
s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;
|
s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;
|
||||||
|
|||||||
Reference in New Issue
Block a user