diff --git a/Archipelago.cpp b/Archipelago.cpp index 47d4fc5..eed0f61 100644 --- a/Archipelago.cpp +++ b/Archipelago.cpp @@ -580,7 +580,11 @@ void AP_SendItems(AP_State* state, std::set const& locations) { Json::Value fake_msg; fake_msg[0]["cmd"] = "ReceivedItems"; - fake_msg[0]["index"] = state->last_item_idx+1; + // size_t (unsigned long on LP64 macOS) is ambiguous across jsoncpp's + // UInt/Int64/UInt64 converting constructors because uint64_t is + // unsigned long long here (distinct from size_t). On Linux x64 uint64_t + // == unsigned long, so it resolved by exact match there. Cast explicitly. + fake_msg[0]["index"] = static_cast(state->last_item_idx + 1); fake_msg[0]["items"] = Json::arrayValue; for (int64_t location_id : new_locations) { int64_t recv_item_id = state->location_to_item[location_id]; diff --git a/README.md b/README.md index da7632c..969cf15 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,8 @@ Clone the Repo recursively! - Enter the folder - `cmake .. -DWIN32=1` (If on MinGW, also add `-DMINGW=1`. If `zlib` is not installed add `-DUSE_ZLIB=OFF`) - `cmake --build .` +## macOS +- Create a folder `build` +- `cd build` +- `cmake ..` (builds for the host architecture; for a specific arch or a universal build add e.g. `-DCMAKE_OSX_ARCHITECTURES=arm64`, `x86_64`, or `"arm64;x86_64"`) +- `cmake --build .`