[GiNaC-devel] [PATCH] Fix unsigned character bugs in ginac-1.5.8
Martin Guy
martinwguy at gmail.com
Sat Apr 2 12:08:24 CEST 2011
Hi
There are a couple of bugs that stop ginac from working on machines
whose characters are unsigned by default (where a conversion to int
goves a value 0-255).
It's the classic "char c = getchar(); if (c == EOF)" with result that
it doesn't detect EOF on unsigned machines, or exits prematurely on
signed machines if it reads a character 255.
The fixes are to replace "char" with "int" so that all 257 possible
return values are correctly handled.
The attached patch for ginac-1.4.3 still applies to 1.5.8
Cheers
M
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ginac-1.4.3+unsignedcharfix.diff
Type: text/x-patch
Size: 1717 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/ginac-devel/attachments/20110402/f80c4b23/attachment.diff>
More information about the GiNaC-devel
mailing list