[sgen] Fix assertion error on 32bits