Changeset 151 for trunk/src/kernel32


Ignore:
Timestamp:
Jun 22, 1999, 1:23:36 AM (26 years ago)
Author:
phaller
Message:

Fix: lstrcpynA does not care about the specified length, but also about the terminating 0 character. WINHLP32 not properly displays the Tabbed Dialog control and Tree View

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.CPP

    r114 r151  
    1 /* $Id: KERNEL32.CPP,v 1.6 1999-06-17 21:52:00 phaller Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.7 1999-06-21 23:23:36 phaller Exp $ */
    22
    33/*
     
    720720LPSTR WIN32API lstrcpynA(LPSTR arg1, LPCSTR  arg2, int arg3)
    721721{
    722     dprintf(("KERNEL32:  OS2lstrcpy\n"));
    723     return strncpy(arg1, arg2, arg3);
     722  register LPSTR p1 = arg1;
     723  register LPSTR p2 = (LPSTR)arg2;
     724
     725  dprintf(("KERNEL32: OS2lstrcpyA(%08xh, %08xh, %08xh)\n",
     726           arg1,
     727           arg2,
     728           arg3));
     729
     730  //PH: looks like either \0 or arg3 terminate the copy
     731  //return strncpy(arg1, arg2, arg3);
     732  for (;*p2 && arg3; arg3--)
     733    *p1++ = *p2++;
     734
     735  return arg1;
    724736}
    725737//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.