fix zerogens handling and size misusage in primdecint.lib