From 3bef33dc1546311bde36ce6f99bfd1a7c0b225b5 Mon Sep 17 00:00:00 2001 From: nash Date: Mon, 2 Aug 2010 09:43:57 +0000 Subject: [PATCH] Update eina_unicode_strnlen git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@50738 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_unicode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/eina_unicode.c b/src/lib/eina_unicode.c index 6cf950e..569646d 100644 --- a/src/lib/eina_unicode.c +++ b/src/lib/eina_unicode.c @@ -1,5 +1,6 @@ /* EINA - EFL data type library - * Copyright (C) 2010-2010 Tom Hacohen + * Copyright (C) 2010 Tom Hacohen, + * Brett Nash * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -96,7 +97,7 @@ eina_unicode_strnlen(const Eina_Unicode *ustr, int n) { const Eina_Unicode *end; const Eina_Unicode *last = ustr + n; /* technically not portable ;-) */ - for (end = ustr; *end && end < last; end++) + for (end = ustr; end < last && *end; end++) ; return end - ustr; } -- 2.7.4