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:
stephena 2014-06-20 00:28:57 +00:00
parent 78f5a2acef
commit 41ea059483
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,7 @@ void PNGLibrary::writeComments(png_structp png_ptr, png_infop info_ptr,
if(numComments == 0)
return;
png_text text_ptr[numComments];
png_text* text_ptr = new png_text[numComments];
for(uInt32 i = 0; i < numComments; ++i)
{
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;
}
png_set_text(png_ptr, info_ptr, text_ptr, numComments);
delete[] text_ptr;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -