Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
  We've upgraded to YaBB 2!
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Print
CxImagePNG crash (compiled using __fastcall) (Read 214 times)
Ivan_A._Krestinin
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1

CxImagePNG crash (compiled using __fastcall)
03/19/05 at 17:26:11
 
When CxImage is compiled using bcc32 with -pr (__fastcall calling conversion by default), there is crash in CxImagePNG sometimes.

For fixing this bug, replace next lines:
===== ximapng.h =====
original: static void user_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
new: static void PNGAPI user_read_data(png_structp png_ptr, png_bytep data, png_size_t length)

original: static void user_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
new: static void PNGAPI user_write_data(png_structp png_ptr, png_bytep data, png_size_t length)

original: static void user_flush_data(png_structp png_ptr)
new: static void PNGAPI user_flush_data(png_structp png_ptr)

original: static void user_error_fn(png_structp png_ptr,png_const_charp error_msg)
new: static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg)


===== ximapng.cpp =====
original: png_set_error_fn(png_ptr,info.szLastError,(png_error_ptr)user_error_fn,NULL);
new: png_set_error_fn(png_ptr,info.szLastError,user_error_fn,NULL);

original: png_set_read_fn(png_ptr, hFile, (png_rw_ptr)user_read_data);
new: png_set_read_fn(png_ptr, hFile, user_read_data);

original: png_set_write_fn(png_ptr,hFile,(png_rw_ptr)user_write_data,(png_flush_ptr)user_f
lush_data);
new: png_set_write_fn(png_ptr,hFile,user_write_data,user_flush_data);
Back to top
 
 
IP Logged
 
Davide
YaBB Moderator
*****
Offline



Posts: 589

Re: CxImagePNG crash (compiled using __fastcall)
Reply #1 - 03/23/05 at 21:00:32
 
thank you, I will check the compatibility with other compilers
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Print