Skip to content

Commit

Permalink
Fix strings on Windows 7
Browse files Browse the repository at this point in the history
  • Loading branch information
namazso committed Jul 15, 2023
1 parent 02e2cb7 commit 5e21dc6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions OpenHashTab/utl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ static NTSTATUS load_string(
nullptr,
nullptr
);
if (status == STATUS_INVALID_PARAMETER_3) {
// win7 workaround

status = LdrResSearchResource(
instance,
path,
3,
1,
&resource,
&size,
nullptr,
nullptr
);
}
if (NT_SUCCESS(status) && resource) {
const size_t table_index = string_id & 0xF;
const auto words_begin = (PUSHORT)resource;
Expand Down

0 comments on commit 5e21dc6

Please sign in to comment.