Ignore:
Timestamp:
Jun 28, 1999, 6:59:17 PM (26 years ago)
Author:
sandervl
Message:

AsciiToUnicodeN bugfix

File:
1 edited

Legend:

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

    r163 r238  
    1 /* $Id: unicode.cpp,v 1.8 1999-06-23 19:36:24 phaller Exp $ */
     1/* $Id: unicode.cpp,v 1.9 1999-06-28 16:59:17 sandervl Exp $ */
    22
    33/*
     
    77 * Copyright 1999 Patrick haller
    88 * Copyright 1999 Achim Hasenmueller
     9 * Copyright 1999 Christoph Bratschi
    910 */
    1011#include <os2win.h>
     
    186187           unicode));
    187188
    188   /* @@@PH 98/06/07 */
    189   if ( (ascii   == NULL) ||                     /* garbage in, garbage out ! */
    190        (unicode == NULL) )
     189  //CB: no input, set at least 0
     190  if (ascii == NULL)
     191  {
     192    if (unicode != NULL && asciilen > 0) unicode[0] = 0;
    191193    return;
     194  }
     195
     196  if (unicode == NULL || asciilen <= 0) return; //nothing to do
    192197
    193198//  dprintf(("KERNEL32: AsciiToUnicodeN %s\n", ascii));
     
    205210                        &out_buf,        &uni_chars_left,
    206211                        &num_subs );
    207   }
    208   else
     212  } else
    209213  {
    210214    for(i=0;
     
    231235}
    232236
     237
Note: See TracChangeset for help on using the changeset viewer.