Ignore:
Timestamp:
Oct 14, 1999, 7:15:26 PM (26 years ago)
Author:
phaller
Message:

Fix: lstrcpyAW taking NULL parameters (broken WINE controls?)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/heapstring.cpp

    r1280 r1292  
    1 /* $Id: heapstring.cpp,v 1.14 1999-10-14 09:21:41 sandervl Exp $ */
     1/* $Id: heapstring.cpp,v 1.15 1999-10-14 17:15:26 phaller Exp $ */
    22
    33/*
     
    1212 * Includes                                                                  *
    1313 *****************************************************************************/
    14 #undef DEBUG
     14
     15#include <odin.h>
     16#include <odinwrap.h>
     17#include <os2sel.h>
    1518
    1619#include <os2win.h>
     
    2932 * Defines                                                                   *
    3033 *****************************************************************************/
     34
     35ODINDEBUGCHANNEL(KERNEL32-HEAPSTRING)
    3136
    3237
     
    323328 *****************************************************************************/
    324329
    325 LPSTR WIN32API lstrcpyA(LPSTR arg1, LPCSTR  arg2)
    326 {
    327   dprintf(("KERNEL32: lstrcpy(%08xh,%s)\n",
    328            arg1,
    329            arg2));
    330 
    331   return O32_lstrcpy(arg1, arg2);
    332 }
    333 
    334 
    335 /*****************************************************************************
    336  * Name      :
    337  * Purpose   :
    338  * Parameters:
    339  * Variables :
    340  * Result    :
    341  * Remark    :
    342  * Status    :
    343  *
    344  * Author    : Patrick Haller [Thu, 1999/08/05 20:46]
    345  *****************************************************************************/
    346 
    347 LPWSTR WIN32API lstrcpyW(LPWSTR dest, LPCWSTR src)
    348 {
    349   dprintf(("KERNEL32: lstrcpyW(%08xh,%08xh)",
    350            dest,
    351            src));
     330ODINFUNCTION2(LPSTR,lstrcpyA,LPSTR, dest,
     331                             LPCSTR,src)
     332{
     333  if ( (src == NULL) || (dest == NULL) ) // stupid parameter checking
     334     return NULL;
     335
     336  return O32_lstrcpy(dest, src);
     337}
     338
     339
     340/*****************************************************************************
     341 * Name      :
     342 * Purpose   :
     343 * Parameters:
     344 * Variables :
     345 * Result    :
     346 * Remark    :
     347 * Status    :
     348 *
     349 * Author    : Patrick Haller [Thu, 1999/08/05 20:46]
     350 *****************************************************************************/
     351
     352ODINFUNCTION2(LPWSTR,lstrcpyW,LPWSTR, dest,
     353                              LPCWSTR,src)
     354{
     355  if ( (src == NULL) || (dest == NULL) ) // stupid parameter checking
     356     return NULL;
    352357
    353358  UniStrcpy( (UniChar*)dest,
Note: See TracChangeset for help on using the changeset viewer.