Test it 2 (you must compare pointers before or out-of-bounds access will happen)
Test case: NULL, 0
test case2: {'a'}, 1
And really, add the test case to our suite.
On Saturday, July 31, 2010, Enlightenment SVN
<[email protected]> wrote:
> Log:
> Fix end points
> Author: nash
> Date: 2010-07-30 22:24:45 -0700 (Fri, 30 Jul 2010)
> New Revision: 50708
>
> Modified:
> trunk/eina/src/lib/eina_unicode.c
>
> Modified: trunk/eina/src/lib/eina_unicode.c
> ===================================================================
> --- trunk/eina/src/lib/eina_unicode.c 2010-07-31 05:17:56 UTC (rev 50707)
> +++ trunk/eina/src/lib/eina_unicode.c 2010-07-31 05:24:45 UTC (rev 50708)
> @@ -96,7 +96,7 @@
> {
> const Eina_Unicode *end;
> const Eina_Unicode *last = ustr + n; /* technically not portable ;-) */
> - for (end = ustr; *end && last < end; end++)
> + for (end = ustr; *end && end < last; end++)
> ;
> return end - ustr;
> }
>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel