Ignore:
Timestamp:
Nov 9, 1999, 3:19:47 PM (26 years ago)
Author:
sandervl
Message:

heapstring fixes + dll renaming support added

File:
1 edited

Legend:

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

    r1605 r1663  
    1 /* $Id: heapstring.cpp,v 1.17 1999-11-05 09:16:57 sandervl Exp $ */
     1/* $Id: heapstring.cpp,v 1.18 1999-11-09 14:19:46 sandervl Exp $ */
    22
    33/*
     
    539539    }
    540540
    541     uni_chars_left = unilen-1; //elements
     541    //SvL: Determine length of unicode string
     542    uni_chars_left = UniStrlen((UniChar*)ustring)+1;
     543    uni_chars_left = min(uni_chars_left, unilen);
     544    unilen = uni_chars_left;
     545
    542546    out_bytes_left = uni_chars_left; //size in bytes == elements
    543547    in_buf  = (UniChar*)ustring;
     
    625629    //in_bytes_left = asciilen-1; //buffer size in bytes
    626630
    627     in_bytes_left = asciilen; //buffer size in bytes
     631    //SvL: Determine length of ascii string
     632    in_bytes_left = strlen(in_buf)+1;
     633    in_bytes_left = min(in_bytes_left, asciilen); //buffer size in bytes
     634   
    628635    out_buf = (UniChar*)unicode;
    629636
     
    637644    //@@@PH what's this?
    638645    //unicode[asciilen-1-in_bytes_left] = 0;
    639 
    640     //if (rc != ULS_SUCCESS && in_bytes_left > 0) //CB: never the case during my tests
    641     //   dprintf(("KERNEL32: AsciiToUnicode failed, %d bytes left!\n",in_bytes_left));
    642646
    643647    //@@@PH what's this?
Note: See TracChangeset for help on using the changeset viewer.