#set_display_name() - cannot cast value type to "pattern" - why?

1 messages ยท Page 1 of 1 (latest)

coarse wren
#

Hi,

I'm not sure why for:

PEFImportedLibrary importTableHeaders[loaderHeader.importedLibraryCount] @ loaderOffset + sizeof(loaderHeader);

std::core::set_display_name(importTableHeaders[0].nameOffset, "AAAA");

I get error

E: <Source Code>:377:69
E: 377 | Headers[0].nameOffset, "AAAA");
E: ^

E: runtime error: Cannot cast value to type 'pattern'.

?

Could you help ๐Ÿ™‚ ?

wary totem
#

I don't know what this is but I assume it is some integer

importTableHeaders[0].nameOffset

what the function expects is the pattern itself, not the offset where it is located. My guess is that

importTableHeaders[0]

would do instead but i can't be sure without knowing whats behind these variables.