INNER CODE UNIT · C++
prefix
evanbowman/BPCore-Engine · source/filesystem.cpp:27
const int prefix = *(const int*)prefix_str;
bool match = false;
int i = 0;
for (; i < (search_end - magic_len) - search_start; i += 4) {
pfrm.feed_watchdog();
int word;
memcpy(&word, (search_start + i), 4);
if (word == prefix) {
match = true;
for (int j = 4; j < magic_len; ++j) {
if (*(search_start + i + j) not_eq magic[j - 4]) {
match = false;
break;
}