From 52195e705c10ab94c2b842591bbd2fda60e13102 Mon Sep 17 00:00:00 2001 From: vchtchetkine Date: Mon, 21 Sep 2009 12:21:29 -0700 Subject: Fix build break caused by undefined min(a,b) --- android/charmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'android') diff --git a/android/charmap.c b/android/charmap.c index 0ccd6dd..23f65fa 100644 --- a/android/charmap.c +++ b/android/charmap.c @@ -580,7 +580,10 @@ kcm_extract_charmap_name(const char* kcm_file_path, } // Copy file name to charmap name. - to_copy = min(max_len - 1, ext_separator - file_name); + to_copy = ext_separator - file_name; + if (to_copy > (max_len - 1)) { + to_copy = max_len - 1; + } memcpy(charmap_name, file_name, to_copy); charmap_name[to_copy] = '\0'; } -- cgit v1.1