diff --git a/src/compress_lzma.cpp b/src/compress_lzma.cpp index 54dba11a..79b691e0 100644 --- a/src/compress_lzma.cpp +++ b/src/compress_lzma.cpp @@ -95,7 +95,8 @@ int compress_lzma_dummy = 0; #if (WITH_LZMA >= 0x461) #include "C/7zVersion.h" -#if (WITH_LZMA != (0x100 * MY_VER_MAJOR) + (0x10 * (MY_VER_MINOR / 10)) + (MY_VER_MINOR % 10)) +#if (WITH_LZMA != ((0x1000 * (MY_VER_MAJOR / 10)) + (0x0100 * (MY_VER_MAJOR % 10)) +\ + (0x0010 * (MY_VER_MINOR / 10)) + (0x0001 * (MY_VER_MINOR % 10)))) # error "WITH_LZMA version mismatch" #endif diff --git a/src/stub/src/c/Makevars.lzma b/src/stub/src/c/Makevars.lzma old mode 100644 new mode 100755 index e55b7834..fe069c8c --- a/src/stub/src/c/Makevars.lzma +++ b/src/stub/src/c/Makevars.lzma @@ -12,7 +12,7 @@ endif endif ifneq ($(wildcard $(UPX_LZMADIR)/C/7zVersion.h),) -UPX_LZMA_VERSION := $(shell perl -ne 'print "0x$$1$$2" if /^\s*\#\s*define\s+MY_VERSION\s+"(\d)\.(\d\d)[\s\w]*"/;' $(UPX_LZMADIR)/C/7zVersion.h) +UPX_LZMA_VERSION := $(shell perl -ne 'print "0x$$1$$2" if /^\s*\#\s*define\s+MY_VERSION\s+"(\d*)\.(\d\d)[\s\w]*"/;' $(UPX_LZMADIR)/C/7zVersion.h) else ifneq ($(wildcard $(UPX_LZMADIR)/CPP/Windows/Time.cpp),) UPX_LZMA_VERSION = 0x459 else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zBuf.h),)