Ignore:
Timestamp:
Dec 20, 2001, 9:45:56 PM (24 years ago)
Author:
sandervl
Message:

GetClassNameW fix; return size in characters and truncate name if not enough room in buffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32class.cpp

    r6620 r7663  
    1 /* $Id: win32class.cpp,v 1.28 2001-09-01 12:43:51 sandervl Exp $ */
     1/* $Id: win32class.cpp,v 1.29 2001-12-20 20:45:55 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Managment Code for OS/2
     
    341341
    342342  if(HIWORD(classNameW)) {
    343         lstrcpyW(lpszClassName, classNameW);
    344         return lstrlenW(lpszClassName)*sizeof(WCHAR);
     343        lstrcpynW(lpszClassName, classNameW, cchClassName-1);
     344        return lstrlenW(lpszClassName);
    345345  }
    346346  *(ULONG *)lpszClassName = classAtom;
Note: See TracChangeset for help on using the changeset viewer.