Set the window title from the module resource pool

This commit is contained in:
x1nixmzeng
2016-01-07 00:58:05 +00:00
parent 729a1af0d5
commit 321e2d8873
2 changed files with 21 additions and 2 deletions

View File

@@ -208,7 +208,7 @@ X_STATUS UserModule::GetSection(const char* name, uint32_t* out_section_data,
return X_STATUS_NOT_FOUND;
}
uint32_t count = (resource_header->size - 4) / 16;
uint32_t count = (resource_header->size - 4) / sizeof(xex2_resource);
for (uint32_t i = 0; i < count; i++) {
auto& res = resource_header->resources[i];
if (std::strncmp(name, res.name, 8) == 0) {