mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* strop.c (scm_substring_move_x): Signal an error if start1
doesn't come before end1. (Thanks to Karoly Lorentey).
This commit is contained in:
parent
b4a204af78
commit
5b20cc4bf8
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
/* classes: src_files */
|
||||
|
||||
/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994, 1996, 1997, 1999 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -138,6 +138,7 @@ scm_substring_move_x (SCM str1, SCM start1, SCM end1,
|
|||
|
||||
s1 = SCM_INUM (start1), s2 = SCM_INUM (start2), e = SCM_INUM (end1);
|
||||
len = e - s1;
|
||||
SCM_ASSERT (len >= 0, end1, SCM_OUTOFRANGE, s_substring_move_x);
|
||||
SCM_ASSERT (s1 <= SCM_LENGTH (str1) && s1 >= 0, start1,
|
||||
SCM_OUTOFRANGE, s_substring_move_x);
|
||||
SCM_ASSERT (s2 <= SCM_LENGTH (str2) && s2 >= 0, start2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue