This commit is contained in:
Kovid Goyal
2019-06-11 15:30:50 +05:30
parent 65b95999c1
commit 0fafc07db0

4
glfw/ibus_glfw.c vendored
View File

@@ -57,7 +57,7 @@ test_env_var(const char *name, const char *val) {
} }
static inline size_t static inline size_t
MIN(size_t a, size_t b) { GLFW_MIN(size_t a, size_t b) {
return a < b ? a : b; return a < b ? a : b;
} }
@@ -151,7 +151,7 @@ get_ibus_address_file_name(void) {
addr = getenv("IBUS_ADDRESS"); addr = getenv("IBUS_ADDRESS");
int offset = 0; int offset = 0;
if (addr && addr[0]) { if (addr && addr[0]) {
memcpy(ans, addr, MIN(strlen(addr), sizeof(ans))); memcpy(ans, addr, GLFW_MIN(strlen(addr), sizeof(ans)));
return ans; return ans;
} }