]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
hyperscan#41: ignore carriage-return in pattern files
authorMatthew Barr <matthew.barr@intel.com>
Wed, 23 Nov 2016 00:07:10 +0000 (11:07 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Mon, 2 Jan 2017 21:55:20 +0000 (08:55 +1100)
examples/patbench.cc
examples/pcapscan.cc

index 9c2b41fa4b230add9aa3ddbc9c717b69349254df..f82f47a737a0b168b2e0aff767a2438e3a22daae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -833,6 +833,8 @@ static unsigned parseFlags(const string &flagsStr) {
             flags |= HS_FLAG_UTF8; break;
         case 'W':
             flags |= HS_FLAG_UCP; break;
+        case '\r': // stray carriage-return
+            break;
         default:
             cerr << "Unsupported flag \'" << c << "\'" << endl;
             exit(-1);
index 032b19cd961cc38d3344ab84fb609ff54b7efcd7..12b944388e594c7663c068a017dadecb9345e65c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -621,6 +621,8 @@ static unsigned parseFlags(const string &flagsStr) {
             flags |= HS_FLAG_UTF8; break;
         case 'W':
             flags |= HS_FLAG_UCP; break;
+        case '\r': // stray carriage-return
+            break;
         default:
             cerr << "Unsupported flag \'" << c << "\'" << endl;
             exit(-1);