mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
hyperscan#41: ignore carriage-return in pattern files
This commit is contained in:
parent
2f57681bb6
commit
83e69cc195
@ -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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* 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;
|
flags |= HS_FLAG_UTF8; break;
|
||||||
case 'W':
|
case 'W':
|
||||||
flags |= HS_FLAG_UCP; break;
|
flags |= HS_FLAG_UCP; break;
|
||||||
|
case '\r': // stray carriage-return
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cerr << "Unsupported flag \'" << c << "\'" << endl;
|
cerr << "Unsupported flag \'" << c << "\'" << endl;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* 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;
|
flags |= HS_FLAG_UTF8; break;
|
||||||
case 'W':
|
case 'W':
|
||||||
flags |= HS_FLAG_UCP; break;
|
flags |= HS_FLAG_UCP; break;
|
||||||
|
case '\r': // stray carriage-return
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cerr << "Unsupported flag \'" << c << "\'" << endl;
|
cerr << "Unsupported flag \'" << c << "\'" << endl;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user