From 7af4107235e6c178d5740782fe510d2df1c825b1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 11 Nov 2021 15:21:59 -0500 Subject: Fix Makefile issues with OSX 11.6 --- tools/knarc/Narc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/knarc/Narc.cpp') 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 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(sizeof(FileImages) + fatEntries.back().End) + .ChunkSize = static_cast(sizeof(FileImages) + (fatEntries.empty() ? 0 : fatEntries.back().End)) }; if ((fi.ChunkSize % 4) != 0) -- cgit v1.2.3