fix for building with mingw
This commit is contained in:
@@ -253,7 +253,7 @@ void *BLI_gzopen(const char *filename, const char *mode)
|
||||
|
||||
/* temporary #if until we update all libraries to 1.2.7
|
||||
* for correct wide char path handling */
|
||||
#if ZLIB_VERNUM >= 0x1270
|
||||
#if ZLIB_VERNUM >= 0x1270 && !defined(FREE_WINDOWS)
|
||||
UTF16_ENCODE(filename);
|
||||
|
||||
gzfile = gzopen_w(filename_16, mode);
|
||||
|
||||
@@ -118,8 +118,8 @@ int BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos)
|
||||
const char *str_next = BLI_str_find_next_char_utf8(str_pos, str_end);
|
||||
if (str_next) {
|
||||
(*pos) += (str_next - str_pos);
|
||||
if ((*pos) > maxlen) {
|
||||
(*pos) = maxlen;
|
||||
if ((*pos) > (int)maxlen) {
|
||||
(*pos) = (int)maxlen;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user