- Timestamp:
- Oct 19, 1999, 9:44:23 PM (26 years ago)
- 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 sandervlExp $ */1 /* $Id: edit.cpp,v 1.5 1999-10-19 19:44:23 phaller Exp $ */ 2 2 /* 3 3 * Edit control … … 2809 2809 static INT EDIT_WM_GetText(HWND hwnd, EDITSTATE *es, INT count, LPSTR text) 2810 2810 { 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; 2818 2819 } 2819 2820
Note:
See TracChangeset
for help on using the changeset viewer.