]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Fix platform compatibility check
authorDmitry Yakovenko <jakovenko-dm@yandex.ru>
Sat, 11 Jan 2020 21:35:37 +0000 (00:35 +0300)
committerHong, Yang A <yang.a.hong@intel.com>
Wed, 15 Jan 2020 15:40:10 +0000 (15:40 +0000)
src/database.c

index dc03bf1fb3fc4fd4ad396ee5f473381a7bcd637a..1a79800e2d70acf0136b8bd459f19f65f783c2cc 100644 (file)
@@ -114,8 +114,8 @@ hs_error_t HS_CDECL hs_serialize_database(const hs_database_t *db, char **bytes,
 static
 hs_error_t db_check_platform(const u64a p) {
     if (p != hs_current_platform
-        && p != hs_current_platform_no_avx2
-        && p != hs_current_platform_no_avx512) {
+        && p != (hs_current_platform | hs_current_platform_no_avx2)
+        && p != (hs_current_platform | hs_current_platform_no_avx512)) {
         return HS_DB_PLATFORM_ERROR;
     }
     // passed all checks