[pywin32-checkins] pywin32/win32/src win32apimodule.cpp, 1.100, 1.101
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2010-08-25 07:35:12
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26440/win32/src Modified Files: win32apimodule.cpp Log Message: ensure GetConsoleTitle treats an empty string correctly Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** win32apimodule.cpp 26 Jan 2010 17:45:27 -0000 1.100 --- win32apimodule.cpp 25 Aug 2010 07:34:59 -0000 1.101 *************** *** 942,945 **** --- 942,946 ---- if (title==NULL) return PyErr_Format(PyExc_MemoryError, "GetConsoleTitle: unable to allocate %d bytes", chars_allocated*sizeof(TCHAR)); + title[0] = 0; chars_returned=GetConsoleTitle(title, chars_allocated); if (chars_returned==0 && GetLastError() != ERROR_SUCCESS){ |