diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-07 22:41:10 -0700 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-07 22:45:15 -0700 |
commit | 728f6f9e7f0a99aa584e7f35ade387e852b5fa83 (patch) | |
tree | cc9c89ec0501bcad3e480b5ef9444bde1b4bc7c8 /src | |
parent | 1a686a660c750499d3e1c4b46e3c506748147a08 (diff) | |
download | libsurvive-728f6f9e7f0a99aa584e7f35ade387e852b5fa83.tar.gz libsurvive-728f6f9e7f0a99aa584e7f35ade387e852b5fa83.tar.bz2 |
Added a check at init that makes sure the user agrees with what FLT is
Diffstat (limited to 'src')
-rwxr-xr-x | src/survive.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/survive.c b/src/survive.c index 0386275..4e52637 100755 --- a/src/survive.c +++ b/src/survive.c @@ -94,7 +94,14 @@ static void *button_servicer(void * context) return NULL; } -SurviveContext * survive_init( int headless ) +void survive_verify_FLT_size(uint32_t user_size) { + if(sizeof(FLT) != user_size) { + fprintf(stderr, "FLT type incompatible; the shared library has FLT size %lu vs user program %u\n", sizeof(FLT), user_size); + exit(-1); + } +} + +SurviveContext * survive_init_internal( int headless ) { #ifdef RUNTIME_SYMNUM if( !did_runtime_symnum ) |