-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safeley handle nulls in WME constructors from SML
If a client passes null to any of the `Create*WME` constructors, Soar segfaults due to accessing invalid memory. This is because it assumes non-null strings for attribute names and values. Fix this by checking for null and using `"nil"` when required. This is in-line with Soar behavior elsewhere (where the `nil` Symbol gets stringified into an attribute name). Also print a warning so that the user knows that this happened. It was likely an accident. The fixes work for all of our SWIG-bindings, so we only need to test in one. Use Python to test the conversions to `"nil"`. Fixes #485.
- Loading branch information
1 parent
a173b29
commit e58a00a
Showing
2 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters