From eec2b8233dbd78552cd5a2ef689c75dc6e940e3d Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Wed, 5 Apr 2017 16:40:07 +1000 Subject: [PATCH] rdfa_merge: sort esets before alphabet calc --- src/nfa/rdfa_merge.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nfa/rdfa_merge.cpp b/src/nfa/rdfa_merge.cpp index 45457555..50e9b62a 100644 --- a/src/nfa/rdfa_merge.cpp +++ b/src/nfa/rdfa_merge.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Intel Corporation + * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -40,6 +40,7 @@ #include "util/report_manager.h" #include "util/ue2_containers.h" +#include #include using namespace std; @@ -135,6 +136,10 @@ public: } } + // Sort so that our alphabet mapping isn't dependent on the order of + // rdfas passed in. + sort(esets.begin(), esets.end()); + alphasize = buildAlphabetFromEquivSets(esets, alpha, unalpha); }