logo       

Patch to fix char signedness issue on ppc: msg#00066

db.mysql.c++

Subject: Patch to fix char signedness issue on ppc

Hello

On Linux/ppc, gcc uses unsigned char's by default. query.cpp constructs
an object of SQLParseElement and gives it a value of -1 for the "char"
parameter (n). Later this value is compared to -1, which will be 255
when using unsigned chars. The result is a wrongly thrown exception. The
attached patch changes the type to "short int" where the number is used.

Signed-off-by: Michael Hanselmann <mysql@xxxxxxxxx>

Greets,
Michael

--
Gentoo Linux developer, http://hansmi.ch/, http://forkbomb.ch/

Attachment: mysql++-signed-char-fix.diff
Description: Text document

Attachment: pgpsHZJ23gIku.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise