Fix broken Windows buiilds after own recent commit in read/write code.

Usual issue of win32 not following POSIX standards.
This commit is contained in:
2020-09-20 19:34:12 +02:00
parent cdad684ada
commit 0d5aa352d3
2 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,10 @@
#pragma once
#ifdef WIN32
# include "BLI_winstuff.h"
#endif
#include "DNA_sdna_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h" /* for ReportType */

View File

@@ -252,7 +252,11 @@ bool BLO_memfile_write_file(struct MemFile *memfile, const char *filename)
}
for (chunk = memfile->chunks.first; chunk; chunk = chunk->next) {
#ifdef _WIN32
if ((size_t)write(file, chunk->buf, (uint)chunk->size) != chunk->size) {
#else
if ((size_t)write(file, chunk->buf, chunk->size) != chunk->size) {
#endif
break;
}
}