diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-05-27 22:00:03 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-05-27 22:00:03 +0000 |
commit | 729dbac32f9b3a8b2c6fe399f4e725549cecd1e7 (patch) | |
tree | b8ffb0687a7290e037a64aef646fee3747574db0 /libguile/gh_data.c | |
parent | fc62c86a599039709b22783a0abc552a5f33719e (diff) | |
download | guile-729dbac32f9b3a8b2c6fe399f4e725549cecd1e7.tar.gz |
* Changed the default definition of SCM.
* Fixed some typing problems detected by the above change.
* Fixed some problems that were detected by compiling guile with -W.
Diffstat (limited to 'libguile/gh_data.c')
-rw-r--r-- | libguile/gh_data.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libguile/gh_data.c b/libguile/gh_data.c index dc31bae09..3843a0741 100644 --- a/libguile/gh_data.c +++ b/libguile/gh_data.c @@ -99,17 +99,14 @@ gh_set_substr (char *src, SCM dst, long start, size_t len) { char *dst_ptr; size_t dst_len; - size_t effective_length; SCM_ASSERT (SCM_STRINGP (dst), dst, SCM_ARG3, "gh_set_substr"); dst_ptr = SCM_STRING_CHARS (dst); dst_len = SCM_STRING_LENGTH (dst); - SCM_ASSERT (len >= 0 && len <= dst_len, - dst, SCM_ARG4, "gh_set_substr"); + SCM_ASSERT (start + len <= dst_len, dst, SCM_ARG4, "gh_set_substr"); - effective_length = (len < dst_len) ? len : dst_len; - memmove (dst_ptr + start, src, effective_length); + memmove (dst_ptr + start, src, len); scm_remember_upto_here_1 (dst); } |