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;



_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to