comparison src/lread.c @ 5489:159face738c3

Never pass a leading + to mpz_set_string, parse_integer (). src/ChangeLog addition: 2011-05-01 Aidan Kehoe <kehoea@parhasard.net> * lread.c (parse_integer): GMP's mpz_set_string deals with a leading plus badly, make sure it never sees one coming from this function. tests/ChangeLog addition: 2011-05-01 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-reader-tests.el: If the bignum feature is available, check that a leading plus sign is treated correctly when reading bignum integers.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 01 May 2011 13:51:33 +0100
parents 8d29f1c4bb98
children 58b38d5b32d0
comparison
equal deleted inserted replaced
5488:1e544fd7be12 5489:159face738c3
2026 p++; 2026 p++;
2027 } 2027 }
2028 else if (*p == '+') 2028 else if (*p == '+')
2029 { 2029 {
2030 p++; 2030 p++;
2031 /* GMP deals with a leading plus sign, badly, make sure it doesn't see
2032 it. */
2033 buf++;
2031 } 2034 }
2032 2035
2033 if (p == lim) 2036 if (p == lim)
2034 goto loser; 2037 goto loser;
2035 2038