Skip to content

Commit

Permalink
fix: linux 地址搜索
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Dec 29, 2024
1 parent c38d25e commit e2b3aed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/hook/hook.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ bool Hook::is_feature_code_matched(const uint8_t *data) {
const uint8_t *Hook::search_feature_code(const uint8_t *data, size_t size) {
spdlog::debug("search_feature_code: {} - {}", (void *)data, size);
const uint8_t * result = nullptr;
for (size_t i = 0; i < size * 0.9; ++i) {
#ifdef _WIN32
size = size*0.9;
#endif
for (size_t i = 0; i < size; ++i) {
// spdlog::info("Check: {}", i);
if (is_feature_code_matched(data + i)) {
if (result != nullptr)
Expand Down
6 changes: 3 additions & 3 deletions test/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -90726,11 +90726,11 @@ SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
}
db = v->db;
sqlite3_mutex_enter(db->mutex);
while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
&& cnt++ < SQLITE_MAX_SCHEMA_RETRY ){
while( (rc = sqlite3Step(v))==SQLITE_SCHEMA /** 17 */
&& cnt++ < SQLITE_MAX_SCHEMA_RETRY /** 50 */){
int savedPc = v->pc;
rc = sqlite3Reprepare(v);
if( rc!=SQLITE_OK ){
if( rc!=SQLITE_OK/* 0 */ ){
/* This case occurs after failing to recompile an sql statement.
** The error message from the SQL compiler has already been loaded
** into the database handle. This block copies the error message
Expand Down

0 comments on commit e2b3aed

Please sign in to comment.