X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d98a58c543948d84d9287e6fa53a5539d662b7a5..87f0b1323b7ac77f02133b836c8dfee63b0fd387:/src/common/zstream.cpp diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index 031dbb29e8..ce63c07dc9 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -47,10 +47,18 @@ enum { wxVersionInfo wxGetZlibVersionInfo() { - return wxVersionInfo("zlib", - ZLIB_VERNUM >> 12, - (ZLIB_VERNUM >> 8) & 0x0F, - (ZLIB_VERNUM & 0xFF) / 0x10); + int major, + minor, + build; + + if ( sscanf(zlibVersion(), "%d.%d.%d", &major, &minor, &build) != 3 ) + { + major = + minor = + build = 0; + } + + return wxVersionInfo("zlib", major, minor, build); } /////////////////////////////////////////////////////////////////////////////