]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table
authorVibhav Pant <vibhavp@gmail.com>
Wed, 25 Jan 2017 19:30:41 +0000 (01:00 +0530)
committerVibhav Pant <vibhavp@gmail.com>
Wed, 25 Jan 2017 19:30:41 +0000 (01:00 +0530)
lisp/emacs-lisp/bytecomp.el

index b608844a08afb34357b26cd74036e04245693969..dff8bcfa20966b3195f0f6c424a9062360867b53 100644 (file)
@@ -4020,7 +4020,10 @@ that suppresses all warnings during execution of BODY."
          (cases (cadr table-info))
          jump-table test-obj body tag donetag default-tag default-case)
     (when (and cases (not (= (length cases) 1)))
-      (setq jump-table (make-hash-table :test test :size (length cases))
+      (setq jump-table (make-hash-table :test test
+                                        :size (if (assq 'default cases)
+                                                  (1- (length cases))
+                                                (length cases)))
             default-tag (byte-compile-make-tag)
             donetag (byte-compile-make-tag))
       (byte-compile-variable-ref var)