diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-11-11 15:21:59 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-11-11 15:21:59 -0500 |
commit | 7af4107235e6c178d5740782fe510d2df1c825b1 (patch) | |
tree | d548d9c443140e77e4e158171055d08ffb77e30b /tools/knarc | |
parent | 94edcc1b5496a41478e10bd6aa4ff84f5c2ee5aa (diff) |
Fix Makefile issues with OSX 11.6
Diffstat (limited to 'tools/knarc')
-rw-r--r-- | tools/knarc/Narc.cpp | 4 | ||||
-rw-r--r-- | tools/knarc/Narc.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/knarc/Narc.cpp b/tools/knarc/Narc.cpp index cce7cdea..be00fb72 100644 --- a/tools/knarc/Narc.cpp +++ b/tools/knarc/Narc.cpp @@ -17,7 +17,7 @@ #include "fnmatch.h" -#if (__GNUC__ <= 7) && !defined _MSC_VER +#if (__cplusplus < 201703L) #include <experimental/filesystem> namespace fs = std::experimental::filesystem; #else @@ -340,7 +340,7 @@ bool Narc::Pack(const fs::path& fileName, const fs::path& directory) FileImages fi { .Id = 0x46494D47, // GMIF - .ChunkSize = static_cast<uint32_t>(sizeof(FileImages) + fatEntries.back().End) + .ChunkSize = static_cast<uint32_t>(sizeof(FileImages) + (fatEntries.empty() ? 0 : fatEntries.back().End)) }; if ((fi.ChunkSize % 4) != 0) diff --git a/tools/knarc/Narc.h b/tools/knarc/Narc.h index 7d9cc117..78c163c6 100644 --- a/tools/knarc/Narc.h +++ b/tools/knarc/Narc.h @@ -5,7 +5,7 @@ #include <string> #include <vector> -#if (__GNUC__ <= 7) && !defined _MSC_VER +#if (__cplusplus < 201703L) #include <experimental/filesystem> namespace fs = std::experimental::filesystem; #else |