diff options
| author | Stefan Boberg <[email protected]> | 2022-06-16 15:42:17 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-06-16 15:42:17 +0200 |
| commit | b8797a647406d31ebfd137a9ae07819ccf332a10 (patch) | |
| tree | b57dcb1443c817577e1c9f8e10a35837e1d85389 /zencore | |
| parent | asio: added some context to error reporting (diff) | |
| download | zen-b8797a647406d31ebfd137a9ae07819ccf332a10.tar.xz zen-b8797a647406d31ebfd137a9ae07819ccf332a10.zip | |
merged from main
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/iobuffer.cpp | 2 | ||||
| -rw-r--r-- | zencore/xmake.lua | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index 56b05d86d..37ef57c2d 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -274,6 +274,8 @@ IoBufferExtendedCore::Materialize() const const uint64_t MappedOffsetDisplacement = m_FileOffset - MapOffset; const uint64_t MapSize = m_DataBytes + MappedOffsetDisplacement; + ZEN_ASSERT(MapSize > 0); + #if ZEN_PLATFORM_WINDOWS NewMmapHandle = CreateFileMapping(m_FileHandle, /* lpFileMappingAttributes */ nullptr, diff --git a/zencore/xmake.lua b/zencore/xmake.lua index 63e874ac5..3f78be99c 100644 --- a/zencore/xmake.lua +++ b/zencore/xmake.lua @@ -4,6 +4,10 @@ target('zencore') set_kind("static") add_headerfiles("**.h") add_configfiles("include/zencore/config.h.in") + on_load(function (target) + local version = io.readfile("VERSION.txt") + target:set("version", version:trim(), {build = "%Y%m%d%H%M"}) + end) set_configdir("include/zencore") add_files("**.cpp") add_includedirs("include", {public=true}) |