From: Vibhav Pant Date: Wed, 25 Jan 2017 19:30:41 +0000 (+0530) Subject: * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table X-Git-Tag: emacs-26.0.90~875 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=19cb3985a3795539b51d70625904e95a6e581eef;p=emacs.git * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b608844a08a..dff8bcfa209 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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)