Ethereal-dev: Re: [ethereal-dev] unicode_to_str seems to return an empty string

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 25 Nov 1999 14:59:17 -0800
> I am trying to fix the problems with Unicode strings, but unicode_to_str
> seems to be returning a pointer to an empty string all the time, even
> though it gets the length correct.

That's odd - I don't see anything obviously wrong with it, as it's
returning "cur", which points to the beginning of one of its static
buffers, rather than "p", which starts out point into that buffer and is
used to deposit stuff into the buffer.

You might want to single-step through it to see if

	1) there's something wrong with it that I'm missing

or

	2) there's some other problem, e.g. a confused compiler.

> Another little note is that there seems to be an extra \0\0 after the \0\0
> terminating the Unicode string as well.  Very strange.

Padding?  Microsoft weirdness?