From: Chris Hanson Date: Thu, 8 Sep 2005 02:02:04 +0000 (+0000) Subject: Don't allow linking a variable to itself. X-Git-Tag: 20090517-FFI~1224 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=069dc180ce3bbbe832f3a41a889d962208b2ad48;p=mit-scheme.git Don't allow linking a variable to itself. --- diff --git a/v7/src/microcode/lookup.c b/v7/src/microcode/lookup.c index fbac7f5ad..88b421ecf 100644 --- a/v7/src/microcode/lookup.c +++ b/v7/src/microcode/lookup.c @@ -1,8 +1,9 @@ /* -*-C-*- -$Id: lookup.c,v 9.70 2003/02/14 18:28:20 cph Exp $ +$Id: lookup.c,v 9.71 2005/09/08 02:02:04 cph Exp $ -Copyright (c) 1988-2001 Massachusetts Institute of Technology +Copyright 1987,1988,1989,1990,1991,1992 Massachusetts Institute of Technology +Copyright 1993,1996,1997,2000,2001,2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -553,7 +554,8 @@ link_variables (SCHEME_OBJECT target_environment, SCHEME_OBJECT target_symbol, SCHEME_OBJECT * target_cell; if (! ((ENVIRONMENT_P (target_environment)) - && (ENVIRONMENT_P (source_environment)))) + && (ENVIRONMENT_P (source_environment)) + && (target_environment != source_environment))) return (ERR_BAD_FRAME); source_cell = (find_binding_cell (source_environment, source_symbol, 0));