From: Pierric <sta...@gm...> - 2006-11-30 05:08:10
|
I recently find a small bug in wxbind/src/gdi.cpp,line 4193. Here is the original code: static int LUACALL wxBitmapFromFile_constructor(lua_State *L) { .... // call constructor returns = new wxBitmap(name, type); ... return 1; } I changed to the following one : returns = new wxBitmap(name, (wxBitmapType)type); The reason is that the wxBitmap have two different ctor wxBitmap(const wxString&,wxBitmapType) and wxBitmap(const wxImage&,int depth,int depth) and the second one is not implicit and the image can be constructed from a string. So here comes the Bug. The "new wxBitmap(name, type); " exactly calls the second ctor instead the first one. |