Changeset 1366 for trunk/src


Ignore:
Timestamp:
Oct 19, 1999, 9:44:23 PM (26 years ago)
Author:
phaller
Message:

Fix: EDIT_WM_GetWindowText corrected according specs.

File:
1 edited

Legend:

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

    r1263 r1366  
    1 /* $Id: edit.cpp,v 1.4 1999-10-12 20:16:22 sandervl Exp $ */
     1/* $Id: edit.cpp,v 1.5 1999-10-19 19:44:23 phaller Exp $ */
    22/*
    33 *      Edit control
     
    28092809static INT EDIT_WM_GetText(HWND hwnd, EDITSTATE *es, INT count, LPSTR text)
    28102810{
    2811         INT len = lstrlenA(es->text);
    2812 
    2813         if (count > len) {
    2814                 lstrcpyA(text, es->text);
    2815                 return len;
    2816         } else
    2817                 return -1;
     2811  INT len;
     2812
     2813  if (es->text == NULL)  // the only case of failure i can imagine
     2814    return 0;
     2815
     2816  len = min(count, lstrlenA(es->text)); // determine length
     2817  lstrcpynA(text, es->text, len);       // copy as much as possible
     2818  return len;
    28182819}
    28192820
Note: See TracChangeset for help on using the changeset viewer.