X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funictype%2Fblocks.c;h=a5cddb320aeb8edd1b200855298d53f22df22158;hb=96f023c5e537dd4afbdb294de7065f65effe3eb2;hp=a20bbcee7727e973d34548e4369d3914d8b6d163;hpb=5a6e55c1886acd86b0deaa9d1d343471f61d3ded;p=gnulib.git diff --git a/lib/unictype/blocks.c b/lib/unictype/blocks.c index a20bbcee7..a5cddb320 100644 --- a/lib/unictype/blocks.c +++ b/lib/unictype/blocks.c @@ -1,5 +1,5 @@ /* Blocks of Unicode characters. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify it @@ -45,11 +45,11 @@ uc_block (ucs4_t uc) { unsigned int mid_index = (first_index + last_index) / 2; if (blocks[mid_index].end < uc) - first_index = mid_index + 1; + first_index = mid_index + 1; else if (uc < blocks[mid_index].start) - last_index = mid_index; + last_index = mid_index; else - return &blocks[mid_index]; + return &blocks[mid_index]; } return NULL; }