Ignore:
Timestamp:
Jun 30, 1999, 3:25:28 PM (26 years ago)
Author:
sandervl
Message:

Unicode changes

File:
1 edited

Legend:

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

    r233 r250  
    1 /* $Id: KERNEL32.CPP,v 1.8 1999-06-28 07:55:16 sandervl Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.9 1999-06-30 13:25:01 sandervl Exp $ */
    22
    33/*
     
    1414 * Copyright 1998 Knut St. Osmundsen
    1515 *
    16  * @(#) KERNEL32.CPP            1.0.1   1998/06/12 PH added HandleManager support
     16 * @(#) KERNEL32.CPP            1.0.1   1998/06/12 PH added HandleManager support
    1717 */
    1818
     
    699699  //PH: looks like either \0 or arg3 terminate the copy
    700700  //return strncpy(arg1, arg2, arg3);
    701   for (;*p2 && arg3; arg3--)
     701  for (;*p2 && (arg3 > 1); arg3--)
    702702    *p1++ = *p2++;
    703703
     704  *p1 = 0; //CB: copy arg-1, set end 0
     705
    704706  return arg1;
    705707}
     
    709711{
    710712    dprintf(("KERNEL32:  OS2lstrcpynW"));
    711     UniStrncpy( (UniChar*)dest, (UniChar*)src, arg3 );
     713    if (arg3 == 0) return NULL;
     714    UniStrncpy( (UniChar*)dest, (UniChar*)src, arg3-1); //CB: copy arg3-1 characters
     715    dest[arg3-1] = 0; //CB: set end
    712716    return dest;
    713717}
     
    11551159
    11561160
     1161
Note: See TracChangeset for help on using the changeset viewer.