initialize .img
without the attached patch ./sent example segfaults here
This commit is contained in:
parent
3ce84e7170
commit
4ca44387e6
2
sent.c
2
sent.c
@ -394,6 +394,8 @@ void load(FILE *fp)
|
|||||||
die("cannot strdup %u bytes:", strlen(buf)+1);
|
die("cannot strdup %u bytes:", strlen(buf)+1);
|
||||||
if (slides[i].text[0] == '@')
|
if (slides[i].text[0] == '@')
|
||||||
slides[i].img = pngopen(slides[i].text + 1);
|
slides[i].img = pngopen(slides[i].text + 1);
|
||||||
|
else
|
||||||
|
slides[i].img = 0;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (slides)
|
if (slides)
|
||||||
|
Loading…
Reference in New Issue
Block a user