Commit 4cce00ca authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Revert [17287].

What the heck? can't you pay attention to SVN warnings about CONFLICTS?
Thanks for introducing a memory leak on top of that.
parent c131e663
...@@ -122,29 +122,26 @@ static inline char *wxDnDFromLocale( const wxChar *stupid ) ...@@ -122,29 +122,26 @@ static inline char *wxDnDFromLocale( const wxChar *stupid )
* UTF-8 but also Windows-1252(!) and ISO-8859-15(!) or any * UTF-8 but also Windows-1252(!) and ISO-8859-15(!) or any
* non-western encoding, it obviously fails. * non-western encoding, it obviously fails.
*/ */
size_t i = 0;
while (stupid[i])
i++;
wxString str(stupid); char psz_local[i + 1];
int i; if ((i >= 1) && (stupid[i - 1] == '\n'))
i--;
size_t n = str.Len(); do
char psz_local[n+1];
for(i=0;i<n;i++)
psz_local[i] = stupid[i]; psz_local[i] = stupid[i];
psz_local[n] = '\0'; while (i--);
if( psz_local[n-1] == '\n' )
psz_local[n-1] = '\0';
return FromLocaleDup( psz_local ); return FromLocaleDup( psz_local );
} }
# define wxDnDLocaleFree( string ) free( string )
#else #else
# define wxDnDFromLocale( string ) wxFromLocale( string ) # define wxDnDFromLocale( string ) wxFromLocale( string )
# define wxDnDLocaleFree( string ) wxLocaleFree( string )
#endif #endif
#define wxDnDLocaleFree( string ) wxLocaleFree( string )
#define WRAPCOUNT 80 #define WRAPCOUNT 80
#define OPEN_NORMAL 0 #define OPEN_NORMAL 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment