enumerated type TOpChangeAccountInfoType not safe.

Started by Skybuck, July 22, 2018, 07:27:59 PM

Previous topic - Next topic

Skybuck

Code should be change to more safe code:

From:
// Skybuck: dangerous to not put prefixes in place, could lead to wrong type usage, fixing it below in next line
// TOpChangeAccountInfoType = (public_key,account_name,account_type,list_for_public_sale,list_for_private_sale,delist);

To:
TOpChangeAccountInfoType = (ait_public_key,ait_account_name,ait_account_type,ait_list_for_public_sale,ait_list_for_private_sale,delist);

This will prevent accidental usage of "public_key" fields in trying to change a enumerated type.

(Will be fixed in PascalCoin(Restructured) and possible PascalCoin(Skybuck), should be fixed in main PascalCoin too).