mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
66be0293ff
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From 42f7f35d893a6bfff89c5da05cb497ddabef1a2a Mon Sep 17 00:00:00 2001
|
|
From: Francesco Abbate <francesco.bbt@gmail.com>
|
|
Date: Thu, 27 Jun 2024 18:33:13 +0200
|
|
Subject: [PATCH] fix problem with __m128i undefined on ARM
|
|
|
|
---
|
|
src/HexDialogs.cpp | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/src/HexDialogs.cpp b/src/HexDialogs.cpp
|
|
index 80af2da..8eecdc8 100644
|
|
--- a/src/HexDialogs.cpp
|
|
+++ b/src/HexDialogs.cpp
|
|
@@ -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)
|