summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:01:05 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:01:05 +0000
commitef55349a9cd366d2983971ef25eae5e1521d1cac (patch)
treefd78adbf99e185e684e18cb5a3e3044264d90292
parent86e9c21194d3b53e5a7697ba024dd849a5336972 (diff)
downloadlibnsgif-ef55349a9cd366d2983971ef25eae5e1521d1cac.tar.gz
libnsgif-ef55349a9cd366d2983971ef25eae5e1521d1cac.tar.bz2
C89
svn path=/trunk/libnsgif/; revision=5841
-rw-r--r--libnsgif.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libnsgif.c b/libnsgif.c
index c98c320..0146414 100644
--- a/libnsgif.c
+++ b/libnsgif.c
@@ -319,7 +319,10 @@ gif_result gif_initialise(gif_animation *gif, size_t size, unsigned char *data)
return GIF_INSUFFICIENT_DATA;
}
for (index = 0; index < gif->colour_table_size; index++) {
- char colour[] = {gif_data[0], gif_data[1], gif_data[2], (char)0xff};
+ char colour[] = {0, 0, 0, (char)0xff};
+ colour[0] = gif_data[0];
+ colour[1] = gif_data[1];
+ colour[2] = gif_data[2];
gif->global_colour_table[index] = *((int *) colour);
gif_data += 3;
}
@@ -823,7 +826,10 @@ gif_result gif_decode_frame(gif_animation *gif, unsigned int frame) {
colour_table = gif->local_colour_table;
if (!clear_image) {
for (index = 0; index < colour_table_size; index++) {
- char colour[] = {gif_data[0], gif_data[1], gif_data[2], (char)0xff};
+ char colour[] = {0, 0, 0, (char)0xff};
+ colour[0] = gif_data[0];
+ colour[1] = gif_data[1];
+ colour[2] = gif_data[2];
colour_table[index] = *((int *) colour);
gif_data += 3;
}