guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

srfi-13 bug [WAS: guile-gnome-glib 2.3.993]


From: Jan Nieuwenhuizen
Subject: srfi-13 bug [WAS: guile-gnome-glib 2.3.993]
Date: Mon, 13 Sep 2004 20:43:40 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Jan Nieuwenhuizen writes:

> Andy Wingo writes:
>
>> http://ambient.2y.net/wingo/tmp/guile-gnome-glib-2.3.993.tar.gz
>>
>> Give it a whirl
>
> It doesn't work for me with CVS guile, generate-wrapset hangs during make:

Found it.  It turns out that

    guile -c '(string-contains "" "a")'

hangs with guile CVS.  See fix below.

Greetings,
Jan.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/ChangeLog,v
retrieving revision 1.2146
diff -p -u -r1.2146 ChangeLog
--- ChangeLog   8 Sep 2004 23:04:08 -0000       1.2146
+++ ChangeLog   13 Sep 2004 18:40:58 -0000
@@ -1,3 +1,8 @@
+2004-09-13  Jan Nieuwenhuizen  <address@hidden>
+
+       * srfi-13.c (scm_string_contains): Bugfix: when subtracting
+       unsigned values, make sure that result does not wrap.
+
 2004-09-09  Kevin Ryde  <address@hidden>
 
        * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
Index: srfi-13.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/srfi-13.c,v
retrieving revision 1.4
diff -p -u -r1.4 srfi-13.c
--- srfi-13.c   7 Sep 2004 13:48:49 -0000       1.4
+++ srfi-13.c   13 Sep 2004 18:40:59 -0000
@@ -2253,7 +2253,7 @@ SCM_DEFINE (scm_string_contains, "string
                                   5, start2, cstart2,
                                   6, end2, cend2);
   len2 = cend2 - cstart2;
-  while (cstart1 <= cend1 - len2)
+  while (cstart1 <= cend1 - len2 && cend1 >= len2)
     {
       i = cstart1;
       j = cstart2;

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]