ivansafrin/Polycode — pull request #98 by mcclure (2012-03-15 09:18:56+00:00)
Title: NULL-safe String methods

Several String methods (constructors, mutators) take char * as an argument. If NULL is passed into any of these methods, the program will crash. This is particularly worrisome because in several places Polycode itself calls the String constructor with tinyxml->Attribute() as an argument, a method which can sometimes return NULL. So like if you put this in a .mat file:

Polycode will crash, because Polycode will check the "default" attribute (not there) and pass the unsanitized result directly to String().

Patch changes String methods to interpret NULL as "empty string".