[haiku-commits] haiku: hrev45476 - src/kits/locale

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 10 Apr 2013 00:22:44 +0200 (CEST)

hrev45476 adds 1 changeset to branch 'master'
old head: 5b4fb267ad682310816044be16427b98c5d7beda
new head: 26f129eff240bac8a2ac013413f71d042aa95576
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=26f129e+%5E5b4fb26

----------------------------------------------------------------------------

26f129e: Fix #9649.
  
  - Fix regression introduced in hrev45462: BUnicodeChar::FromUTF8 was no
  longer advancing the passed in string pointer, resulting in endless
  loops in functions relying on that behavior such as the locale kit's
  CoerceFormatTo*() functions.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45476
Commit:      26f129eff240bac8a2ac013413f71d042aa95576
URL:         http://cgit.haiku-os.org/haiku/commit/?id=26f129e
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Apr  9 22:19:21 2013 UTC

Ticket:      https://dev.haiku-os.org/ticket/9649

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 1 deletion(-)
src/kits/locale/UnicodeChar.cpp | 4 +++-

----------------------------------------------------------------------------

diff --git a/src/kits/locale/UnicodeChar.cpp b/src/kits/locale/UnicodeChar.cpp
index 242e16d..eed3b9c 100644
--- a/src/kits/locale/UnicodeChar.cpp
+++ b/src/kits/locale/UnicodeChar.cpp
@@ -253,7 +253,9 @@ BUnicodeChar::FromUTF8(const char **in)
 {
        int i = 0;
        uint32 c = 0;
-       U8_GET_UNSAFE(*in, i, c);
+       U8_NEXT_UNSAFE(*in, i, c);
+       *in += i;
+
        return c;
 }
 


Other related posts: