Hi, There seems to be an error in win32 implementation of nglConsole (typing more than one character causes a crash). I'm not sure if the attached diff is a proper fix (haven't really "consulted" some things with msdn), but seems to work for me ;-)
cheers, Bart
--- nglConsole_WinXX.cpp.fev Mon Mar 17 18:33:21 2008 +++ nglConsole_WinXX.cpp.1.5 Mon Mar 17 18:27:23 2008 @@ -452,7 +452,7 @@ { nglString line; int result; - nglChar *szCommand=(nglChar*)malloc((cCommand+1)*sizeof(nglChar)); + char *szCommand=(char*)malloc(cCommand+1); 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; - nglChar *szCommand=(nglChar*)malloc((cCommand+1)*sizeof(nglChar)); + char *szCommand=(char*)malloc(cCommand+1); if (!szCommand) return 0; // fixme! *(short *)szCommand = cCommand;
_______________________________________________ https://mail.gna.org/listinfo/ngl-devel