Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upChanged ifstream open mode to binary for overmap and player JSON. #12962
Conversation
This comment has been minimized.
This comment has been minimized.
|
My only concern is breaking existing saves, however json.cpp might handle
it transparently, which would be nice.
|
This comment has been minimized.
This comment has been minimized.
|
I think the main difference on the Windows side is how binary/text mode deals with control characters. The JSON code already looks like it deals with them without depending on the input mode by parsing each byte. |
kevingranade
self-assigned this
Jul 17, 2015
This comment has been minimized.
This comment has been minimized.
|
Pulling to build, I can't test, but it's the right thing to do anyway so I'll go ahead ad pull it as long as it doesn't seem to break anything. |
This comment has been minimized.
This comment has been minimized.
|
I tested it on mingw64/win7, it works fine. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the confirmation :) |
kevingranade
merged commit ff8cff2
into
CleverRaven:master
Jul 17, 2015
1 check passed
This comment has been minimized.
This comment has been minimized.
|
Ooh, I was about to wonder whether this actually did anything, but this was just now merged. Will be eager to see the results. EDIT: Confirmed, build 3426 seems to be working fine to me. Thank you to DanmakuDan for this. |
This comment has been minimized.
This comment has been minimized.
|
Fixed #12945 |
DanmakuDan commentedJul 16, 2015
Fixes #12945. I'm guessing you can't have a Windows file with long lines and \r\n and expect Windows to know where your stream pointer is. I think the 4 MB stream location where it fails is probably more than a coincidence, but sample programs can break the pointer with only a few bytes.