Menu

#41 Improve portability (slightly)

open
nobody
5
2012-10-21
2012-10-21
No

Apparently some setups have mbstring overloading enabled for transparent UTF support, which affects the behaviour of strlen.

Not sure how this would affect binary files but suggest this change based on solution here:

http://stackoverflow.com/questions/3511106/filesize-from-a-string

You could do something like this:

https://github.com/robations/wideimage/commit/1e2da35ffadc39678773085762ca14224eb2f080

(I accidentally thought one of the GitHub clones was the canonical source and submitted a pull request.)

Discussion


Log in to post a comment.

MongoDB Logo MongoDB