What steps will reproduce the problem?
1. svn checkout -r96 http://lzham.googlecode.com/svn/trunk/ lzham-read-only
2. Open lzham.sln with VC++2012
3. Debug Build All & Start Debugging lzhamtest with VC++2012 Debugger
What is the expected output?
lzhamtest outputs "Compression test succeeded."
What do you see instead?
Assertion failed:
lzham-read-only\lzhamdecomp\lzham_prefix_coding.cpp(155): Assertion failed: "!c
|| (math::total_bits(pCodes[i]) <= pCodesizes[i])"
What version of the product are you using? On what operating system?
version: lzham svn trunk r96
OS: Windows7 Professional SP1 64bit
Please provide any additional information below.
I've compiled with Visual Studio Express 2012 for Windows Desktop (VC++2012).
I think this patch will work:
// lzhamdecomp/lzham_math.h
inline uint total_bits(uint v)
{
unsigned long l = 0;
...
#elif defined(LZHAM_USE_MSVC_INTRINSICS)
if (_BitScanReverse(&l, v))
{
l++;
}
+ else
+ {
+ l = 0;
+ }
#else
...
}
Anyway, lzham looks very nice! I'm looking forward to the release ^_^
Original issue reported on code.google.com by takayuki...@gmail.com on 27 Sep 2012 at 6:46
Original issue reported on code.google.com by
takayuki...@gmail.com
on 27 Sep 2012 at 6:46