For all platforms except WXMAC, the wxGIFDecoder::dgif function was
allocating 3 arrays of 4096 ints in the stack (48K) which causes problems with Watcom. Now all platforms behave like WXMAC, i.e. the arrays are allocated (and freed) dynamically on the heap. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1e48782762
commit
7679ac6334
@ -332,15 +332,9 @@ int wxGIFDecoder::getcode(int bits, int ab_fin)
|
||||
//
|
||||
int wxGIFDecoder::dgif(GIFImage *img, int interl, int bits)
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
int *ab_prefix = new int[4096]; /* alphabet (prefixes) */
|
||||
int *ab_tail = new int[4096]; /* alphabet (tails) */
|
||||
int *stack = new int[4096]; /* decompression stack */
|
||||
#else
|
||||
int ab_prefix[4096]; /* alphabet (prefixes) */
|
||||
int ab_tail[4096]; /* alphabet (tails) */
|
||||
int stack[4096]; /* decompression stack */
|
||||
#endif
|
||||
int ab_clr; /* clear code */
|
||||
int ab_fin; /* end of info code */
|
||||
int ab_bits; /* actual symbol width, in bits */
|
||||
@ -464,11 +458,10 @@ int wxGIFDecoder::dgif(GIFImage *img, int interl, int bits)
|
||||
}
|
||||
while (code != ab_fin);
|
||||
|
||||
#ifdef __WXMAC__
|
||||
delete [] ab_prefix ;
|
||||
delete [] ab_tail ;
|
||||
delete [] stack ;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user