Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calls to pro_input from trupdate, adding null termination #1159

Merged

Conversation

jsberg-bnl
Copy link

trupdate gives random errors since argument to pro_input is not null-terminated. Added the null termination and rewrote a bit.

I'm being a bit neurotic here, using iso_c_binding to call C from Fortran properly.
Really the interfaces should be put in an include file or module, but this is the only occurrence of this usage at the moment.
Ideally the code base switches from what is being done in mad_extern_f.h and mad_types_f.h to using iso_c_binding, but that's a larger undertaking.

Crash since argument to pro_input is not null-terminated
Used iso_c_binding to call C from Fortran properly
Really the interfaces should be put in an include file or module,
but this is the only occurrence of this usage at the moment.
@rdemaria
Copy link
Contributor

rdemaria commented Mar 1, 2023

It passes the test locally on my machine, therefore I accept it.

@rdemaria rdemaria merged commit 73dc7a9 into MethodicalAcceleratorDesign:master Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants