aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorvchtchetkine <vchtchetkine@google.com>2009-09-21 12:21:29 -0700
committervchtchetkine <vchtchetkine@google.com>2009-09-21 12:21:29 -0700
commit52195e705c10ab94c2b842591bbd2fda60e13102 (patch)
tree3a8d89fa3b696e05698e71a5fcaf9344096e8d65 /android
parent9085a28c14f369d231dbae099a690689179f428a (diff)
downloadexternal_qemu-52195e705c10ab94c2b842591bbd2fda60e13102.zip
external_qemu-52195e705c10ab94c2b842591bbd2fda60e13102.tar.gz
external_qemu-52195e705c10ab94c2b842591bbd2fda60e13102.tar.bz2
Fix build break caused by undefined min(a,b)
Diffstat (limited to 'android')
-rw-r--r--android/charmap.c5
1 files changed, 4 insertions, 1 deletions
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';
}