From 19cb3985a3795539b51d70625904e95a6e581eef Mon Sep 17 00:00:00 2001 From: Vibhav Pant Date: Thu, 26 Jan 2017 01:00:41 +0530 Subject: [PATCH] * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table --- lisp/emacs-lisp/bytecomp.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.5