Test it please ;) On Saturday, July 31, 2010, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > eina: Actually implement strnlen for eina_unicode. > Author: nash > Date: 2010-07-30 20:54:09 -0700 (Fri, 30 Jul 2010) > New Revision: 50700 > > 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 03:21:55 UTC (rev 50699) > +++ trunk/eina/src/lib/eina_unicode.c 2010-07-31 03:54:09 UTC (rev 50700) > @@ -95,7 +95,8 @@ > eina_unicode_strnlen(const Eina_Unicode *ustr, int n) > { > const Eina_Unicode *end; > - for (end = ustr; *end; end++) > + const Eina_Unicode *last = ustr + n; /* technically not portable ;-) */ > + for (end = ustr; *end && last < end; 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 > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >
-- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com 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 enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel