]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/lread.c (read0): Don't allow radix 0 or 1.
authorMattias EngdegÄrd <mattiase@acm.org>
Thu, 15 May 2025 18:44:56 +0000 (20:44 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 21 May 2025 06:06:17 +0000 (08:06 +0200)
This was just a silly mistake introduced in Emacs 29.  Found by Pip Cet.

(cherry picked from commit e888bd990dcc82690ae33052f2aaec3ca827960c)

src/lread.c

index 95c9e71113034eeb740adf0db147f95d5c22dd47..98cda8316ac9e2ed8f05751950f97813113de77d 100644 (file)
@@ -4256,7 +4256,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms)
                if (c == 'r' || c == 'R')
                  {
                    /* #NrDIGITS -- radix-N number */
-                   if (n < 0 || n > 36)
+                   if (n < 2 || n > 36)
                      invalid_radix_integer (n, readcharfun);
                    obj = read_integer (readcharfun, n);
                    break;