Bugfix: encode function wasn't calling legalize function properly
Bugfix: encode function wasn't calling legalize function properly

sunfishcode/cretonne,stoklund/cretonne,stoklund/cretonne,sunfishcode/cretonne,sunfishcode/cretonne,stoklund/cretonne