@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008 - 2009 + * Copyright (c) 2008 - 2010 * Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the @@ -43,14 +43,15 @@ if (!is_utf8) { assert(table_size >= 1); uint8_t *p = (uint8_t*)*string + *length; + uint8_t t; while (--p >= (uint8_t*)*string) - if (table[0][*p]) - *p = table[0][*p]; + if ((t = table[0][*p]) != 0) + *p = t; return; } ulen = [self length];