Friday, January 17, 2003, 11:05:35 AM, you wrote:

>> OK, here is how TBP_GetName (and any other function that returns
>> information into a buffer) is called from TB! (C syntax here)

>>  SizeNeeded = TBP_GetName(NULL, 0);
>>  if (SizeNeeded > 0) {
>>    Buffer = malloc(SizeNeeded);
>>    CharsCopied = TBP_GetName(Buffer, SizeNeeded);
>>  }

Based on this I have to assume that we should be returning the
length plus the null character as you are only allocating enough size
for the string and not the null.  Or shouldn't you allocate
SizeNeeded+1?

Rob


________________________________________________
Current version is 1.62 | "Using TBDEV" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to