Ooops. Here is a better ;-) diff file.
cheers, Bart
--- nglConsole_WinXX.cpp.1.5 Mon Mar 17 18:27:23 2008 +++ nglConsole_WinXX.cpp.fev Mon Mar 17 18:33:21 2008 @@ -452,7 +452,7 @@ { nglString line; int result; - char *szCommand=(char*)malloc(cCommand+1); + nglChar *szCommand=(nglChar*)malloc((cCommand+1)*sizeof(nglChar)); if (!szCommand) return 0; // fixme! *((WORD*)szCommand) = (cCommand+1); // The message EM_GETLINE take the first word of the buffer as the size of the buffer (shitty win32 trick!) result = SendMessage(hwnd,EM_GETLINE,(WPARAM) 0,(LPARAM)(LPCSTR) szCommand); @@ -486,7 +486,7 @@ if (cCommand>0) { if (cCommand < 2) cCommand=2; - char *szCommand=(char*)malloc(cCommand+1); + nglChar *szCommand=(nglChar*)malloc((cCommand+1)*sizeof(nglChar)); if (!szCommand) return 0; // fixme! *(short *)szCommand = cCommand;
_______________________________________________ https://mail.gna.org/listinfo/ngl-devel