VASim icon indicating copy to clipboard operation
VASim copied to clipboard

Fix undefined behavior in element.cpp

Open axelfeldmann opened this issue 1 year ago • 0 comments

Previously, clearInputs() is declared as:

bool clearInputs(); in include/element.h.

However, in its definition in src/element.cpp, it does not actually have a return statement. This is undefined behavior and causes crashes when compiled using gcc 11.4 (and probably many other versions too!)

This PR changes the type of clearInputs() to a void function to fix this undefined behavior.

It also makes a similar (though less critical) fix to convertThreshold in MNRLAdapter.cpp.

axelfeldmann avatar May 17 '24 01:05 axelfeldmann