mirror of https://github.com/stella-emu/stella.git
VS 2013 doesn't like declaring arrays on the stack.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2929 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
78f5a2acef
commit
41ea059483
|
@ -345,7 +345,7 @@ void PNGLibrary::writeComments(png_structp png_ptr, png_infop info_ptr,
|
||||||
if(numComments == 0)
|
if(numComments == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
png_text text_ptr[numComments];
|
png_text* text_ptr = new png_text[numComments];
|
||||||
for(uInt32 i = 0; i < numComments; ++i)
|
for(uInt32 i = 0; i < numComments; ++i)
|
||||||
{
|
{
|
||||||
text_ptr[i].key = (char*) comments[i].first.c_str();
|
text_ptr[i].key = (char*) comments[i].first.c_str();
|
||||||
|
@ -354,6 +354,7 @@ void PNGLibrary::writeComments(png_structp png_ptr, png_infop info_ptr,
|
||||||
text_ptr[i].text_length = 0;
|
text_ptr[i].text_length = 0;
|
||||||
}
|
}
|
||||||
png_set_text(png_ptr, info_ptr, text_ptr, numComments);
|
png_set_text(png_ptr, info_ptr, text_ptr, numComments);
|
||||||
|
delete[] text_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
Loading…
Reference in New Issue