From: Chris Hanson Date: Thu, 4 Oct 2001 16:14:19 +0000 (+0000) Subject: Don't unnecessarily change the length of a string when altering its X-Git-Tag: 20090517-FFI~2527 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cc155b765268a42b8feaf36a778ce0c12ecf8c69;p=mit-scheme.git Don't unnecessarily change the length of a string when altering its maximum length. --- diff --git a/v7/src/microcode/string.c b/v7/src/microcode/string.c index 3416ceb15..36dadc5f9 100644 --- a/v7/src/microcode/string.c +++ b/v7/src/microcode/string.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: string.c,v 9.46 2001/10/04 16:13:57 cph Exp $ +$Id: string.c,v 9.47 2001/10/04 16:14:19 cph Exp $ Copyright (c) 1987-2001 Massachusetts Institute of Technology @@ -162,7 +162,7 @@ DEFINE_PRIMITIVE ("SET-STRING-MAXIMUM-LENGTH!", Prim_set_string_maximum_length, long length = (arg_index_integer (2, ((MAXIMUM_STRING_LENGTH (string)) + 1))); if (length < (STRING_LENGTH (string))) - SET_STRING_LENGTH (string, max_length); + SET_STRING_LENGTH (string, length); MEMORY_SET (string, STRING_HEADER,