Ignore:
Timestamp:
Dec 9, 1999, 1:52:21 AM (26 years ago)
Author:
sandervl
Message:

code heap added + changed back winres fix (breaks Notes) + heapstring fixes

File:
1 edited

Legend:

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

    r1997 r2032  
    1 /* $Id: heapstring.cpp,v 1.21 1999-12-06 20:39:38 sandervl Exp $ */
     1/* $Id: heapstring.cpp,v 1.22 1999-12-09 00:52:20 sandervl Exp $ */
    22
    33/*
     
    552552    astring[unilen] = 0; //terminate
    553553
    554     return unilen;
    555 
     554    return unilen; //length of string (excluding terminator)
    556555  }
    557556  else
     
    628627    //SvL: Determine length of ascii string
    629628    in_bytes_left = strlen(in_buf)+1;
    630     in_bytes_left = min(in_bytes_left, asciilen); //buffer size in bytes
     629    in_bytes_left = asciilen = min(in_bytes_left, asciilen); //buffer size in bytes
    631630   
    632631    out_buf = (UniChar*)unicode;
     
    639638                        &num_subs );
    640639
    641     //@@@PH what's this?
    642     //unicode[asciilen-1-in_bytes_left] = 0;
    643 
    644     //@@@PH what's this?
    645     //return asciilen - 1;
    646     return asciilen;
     640    asciilen -= 1+uni_chars_left; //end + left bytes
     641
     642    unicode[asciilen] = 0; // always terminate string
     643    return asciilen; //length of string (excluding terminator)
    647644  }
    648645  else
Note: See TracChangeset for help on using the changeset viewer.