boardRect.bottom - boardRect.top,\r
tmphdc, boardRect.left, boardRect.top, SRCCOPY);\r
if(saveDiagFlag) { \r
- BITMAP b; int i, j=0, m, w, wb, fac=0; char pData[1000000]; \r
+ BITMAP b; int i, j=0, m, w, wb, fac=0; char *pData; \r
BITMAPINFOHEADER bih; int color[16], nrColors=0;\r
\r
GetObject(bufferBitmap, sizeof(b), &b);\r
- if(b.bmWidthBytes*b.bmHeight <= 990000) {\r
+ if(pData = malloc(b.bmWidthBytes*b.bmHeight + 10000)) {\r
bih.biSize = sizeof(BITMAPINFOHEADER);\r
bih.biWidth = b.bmWidth;\r
bih.biHeight = b.bmHeight;\r
// write bitmap data\r
for(i=0; i<wb*(b.bmHeight - boardRect.top + OUTER_MARGIN); i++) \r
fputc(pData[i], diagFile);\r
+ free(pData);\r
}\r
}\r
\r
{\r
saveDiagFlag = 1; diagFile = f;\r
HDCDrawPosition(NULL, TRUE, NULL);\r
-\r
saveDiagFlag = 0;\r
\r
-// if(f != NULL) fprintf(f, "Sorry, but this feature is still in preparation\n");\r
- \r
fclose(f);\r
return TRUE;\r
}\r