bug-gnulib
[Top][All Lists]
Advanced

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

Re: strcasestr module


From: Bruno Haible
Subject: Re: strcasestr module
Date: Fri, 19 Aug 2005 13:29:22 +0200
User-agent: KMail/1.5

I added this bugfix to the new strstr and strcasestr implementations.

diff -c -3 -r1.1 strcasestr.c
*** strcasestr.c        17 Aug 2005 14:09:19 -0000      1.1
--- strcasestr.c        19 Aug 2005 11:00:06 -0000
***************
*** 88,94 ****
                    {
                      if (!mbui_avail (rneedle))
                        /* Found a match.  */
!                       return (char *) haystack;
                      if (!mbui_avail (rhaystack))
                        /* No match.  */
                        return NULL;
--- 88,94 ----
                    {
                      if (!mbui_avail (rneedle))
                        /* Found a match.  */
!                       return (char *) mbui_cur_ptr (iter_haystack);
                      if (!mbui_avail (rhaystack))
                        /* No match.  */
                        return NULL;
diff -c -3 -r1.12 strstr.c
*** strstr.c    17 Aug 2005 14:05:33 -0000      1.12
--- strstr.c    19 Aug 2005 11:00:06 -0000
***************
*** 71,77 ****
                    {
                      if (!mbui_avail (rneedle))
                        /* Found a match.  */
!                       return (char *) haystack;
                      if (!mbui_avail (rhaystack))
                        /* No match.  */
                        return NULL;
--- 71,77 ----
                    {
                      if (!mbui_avail (rneedle))
                        /* Found a match.  */
!                       return (char *) mbui_cur_ptr (iter_haystack);
                      if (!mbui_avail (rhaystack))
                        /* No match.  */
                        return NULL;





reply via email to

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