Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix problem with __m128i undefined on ARM #224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/HexDialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,17 +1311,22 @@ void FindDialog::OnFindAll( bool internal ) {
//Returns indice of first found if used with ( options & SEARCH_FINDALL) ret_ptr return vector pointer filled with locations at buffer
//WARNING! THIS FUNCTION WILL CHANGE BFR and/or SEARCH strings if SEARCH_MATCHCASE not selected as an option!
inline int FindDialog::SearchAtBuffer( char *bfr, int bfr_size, char* search, int search_size, unsigned options, std::vector<int> *ret_ptr ) {
#ifdef __SSE2__
static const int REG_SZ = sizeof(__m128i);

char internal_array[REG_SZ];
#endif

if( bfr_size < search_size )
return -1;

#ifdef __SSE2__
if(bfr_size < REG_SZ) {
memset(&internal_array[0], 0, sizeof(internal_array));
memcpy(&internal_array[0], bfr, bfr_size);
bfr = &internal_array[0];
}
#endif

///SEARCH_FINDALL operation supersedes SEARCH_BACKWARDS and SEARCH_WRAPAROUND
if(options & SEARCH_FINDALL)
Expand Down