Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Archipelago.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,11 @@ void AP_SendItems(AP_State* state, std::set<int64_t> 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<Json::UInt64>(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];
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 .`