On 20/09/16 16:50, Rob Arthan wrote:
>
> I think this patch fixes it:
>
> diff --git a/libpolyml/pexport.cpp b/libpolyml/pexport.cpp
> index b03b1da..a9ebd2e 100644
> --- a/libpolyml/pexport.cpp
> +++ b/libpolyml/pexport.cpp
> @@ -158,7 +158,7 @@ void PExport::printObject(PolyObject *p)
> for (unsigned i = 0; i < ps->length; i++)
> {
> char ch = ps->chars[i];
> - fprintf(exportFile, "%02x", ch);
> + fprintf(exportFile, "%02x", ch & 0xff);
> }
> }
> else
It seems to work, but it is unclear to me why.
A few lines before there is the following text:
/* See if the first word is a possible length. The length
cannot be one because single character strings are
represented by the character. */
/* This is not infallible but it seems to be good enough
to detect the strings. */
POLYUNSIGNED bytes = length * sizeof(PolyWord);
if (length >= 2 && ...)
It looks like it requires further update.
Makarius
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml