summaryrefslogtreecommitdiff
path: root/libguile/srfi-13.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-11-14 13:25:00 +0100
committerAndy Wingo <wingo@pobox.com>2009-11-14 13:25:00 +0100
commit4b1c3f0e06454feea7aab3f927748addd9322106 (patch)
tree60ba463bf07479d6fdbc4ee77d0482eefc6fd331 /libguile/srfi-13.c
parent67231cef723ace0358e4ff743c0f8656eac48001 (diff)
downloadguile-4b1c3f0e06454feea7aab3f927748addd9322106.tar.gz
fix bug in string comparison
* libguile/srfi-13.c (compare_strings): Switch the "longer" and "shorter" arguments. All the callers of this function assumed that shorter came first. Fixes (string<? "abc" "abcd").
Diffstat (limited to 'libguile/srfi-13.c')
-rw-r--r--libguile/srfi-13.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c
index 4faa377d0..f76093188 100644
--- a/libguile/srfi-13.c
+++ b/libguile/srfi-13.c
@@ -1097,13 +1097,13 @@ SCM_DEFINE (scm_string_compare_ci, "string-compare-ci", 5, 4, 0,
/* This function compares two substrings, S1 from START1 to END1 and
S2 from START2 to END2, possibly case insensitively, and returns
- one of the parameters LESSTHAN, GREATERTHAN, LONGER, SHORTER, or
- EQUAL depending if S1 is less than S2, greater than S2, longer,
- shorter, or equal. */
+ one of the parameters LESSTHAN, GREATERTHAN, SHORTER, LONGER, or
+ EQUAL depending if S1 is less than S2, greater than S2, shorter,
+ longer, or equal. */
static SCM
compare_strings (const char *fname, int case_insensitive,
SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2,
- SCM lessthan, SCM greaterthan, SCM longer, SCM shorter, SCM equal)
+ SCM lessthan, SCM greaterthan, SCM shorter, SCM longer, SCM equal)
{
size_t cstart1, cend1, cstart2, cend2;
SCM ret;