guile-devel
[Top][All Lists]
Advanced

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

Re: Guile BUG: What's wrong with this?


From: Bruce Korb
Subject: Re: Guile BUG: What's wrong with this?
Date: Fri, 06 Jan 2012 15:28:30 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0

On 01/06/12 14:23, Bruce Korb wrote:
Since I'm dead in the water, I've patched the 2.0.3 source:

$ diff -u srfi-13.c~ srfi-13.c
--- srfi-13.c~  2011-07-06 15:50:00.000000000 -0700
+++ srfi-13.c   2012-01-06 15:26:44.963324773 -0800
@@ -2088,6 +2088,8 @@
 string_upcase_x (SCM v, size_t start, size_t end)
 {
   size_t k;
+  if (start == end)
+    return v;

   v = scm_i_string_start_writing (v);
   for (k = start; k < end; ++k)
@@ -2151,6 +2153,8 @@
 string_downcase_x (SCM v, size_t start, size_t end)
 {
   size_t k;
+  if (start == end)
+    return v;

   v = scm_i_string_start_writing (v);
   for (k = start; k < end; ++k)
@@ -2218,6 +2222,8 @@
   SCM ch;
   size_t i;
   int in_word = 0;
+  if (start == end)
+    return str;

   str = scm_i_string_start_writing (str);
   for(i = start; i < end;  i++)
@@ -2310,6 +2316,8 @@
 string_reverse_x (SCM str, size_t cstart, size_t cend)
 {
   SCM tmp;
+  if (cstart == cend)
+    return;

   str = scm_i_string_start_writing (str);
   if (cend > 0)



reply via email to

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