Skip to content

Need help using declare_imageio_format #3102

Answered by MarkCallow
MarkCallow asked this question in Q&A
Discussion options

You must be logged in to vote

I've figured out what is going on. In my Pam plug-in I have

OIIO_EXPORT const char* pam_input_extensions[] = { "pam", nullptr };

If I change the extern declaration to

const char* pam_input_extensions[];

then the function no longer crashes. It appears that with the original declaration, the assigmnent

const char** foo = pam_input_extensions;

ends up with foo being set to the address of the string at pam_input_extensions[0] so *foo is a bogua address. I don't fully understand why.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MarkCallow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant