Browse code

Fix off-by-one error in chmd TOLOWER() fallback

Stuart Caie authored on 2018/02/07 08:17:30
Showing 1 changed files
... ...
@@ -834,7 +834,7 @@ static int search_chunk(struct mschmd_header *chm,
834 834
 # endif
835 835
 # define TOLOWER(x) tolower(x)
836 836
 #else
837
-# define TOLOWER(x) (((x)<0||(x)>256)?(x):mspack_tolower_map[(x)])
837
+# define TOLOWER(x) (((x)<0||(x)>255)?(x):mspack_tolower_map[(x)])
838 838
 /* Map of char -> lowercase char for the first 256 chars. Generated with:
839 839
  * LC_CTYPE=en_GB.utf-8 perl -Mlocale -le 'print map{ord(lc chr).","} 0..255'
840 840
  */