From: Chris Hanson Date: Thu, 24 Oct 1996 16:14:04 +0000 (+0000) Subject: Fix bug that can cause a SIGSEGV. X-Git-Tag: 20090517-FFI~5339 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=190c9d0fb7bd8f34aa98810f1f25dafbb800b201;p=mit-scheme.git Fix bug that can cause a SIGSEGV. --- diff --git a/v7/src/edwin/key-x11.scm b/v7/src/edwin/key-x11.scm index cf42fa1b8..64f932072 100644 --- a/v7/src/edwin/key-x11.scm +++ b/v7/src/edwin/key-x11.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: key-x11.scm,v 1.3 1995/04/13 23:28:37 cph Exp $ +;;; $Id: key-x11.scm,v 1.4 1996/10/24 16:14:04 cph Exp $ ;;; -;;; Copyright (c) 1991-95 Massachusetts Institute of Technology +;;; Copyright (c) 1991-96 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -48,10 +48,12 @@ bucky-bits)) (define (keysym->name keysym) - (cdr (vector-binary-search x-key-translation-table - (lambda (u v) (< u v)) - (lambda (pair) (car pair)) - keysym))) + (let ((entry + (vector-binary-search x-key-translation-table + (lambda (u v) (< u v)) + (lambda (pair) (car pair)) + keysym))) + (and entry (cdr entry)))) ;; This table is a simple translation of /usr/include/X11/keysym.h. ;; However, that the vendor-specific marker (bit 28, numbered from 0)